How to use meta - 10 common examples

To help you get started, we’ve selected a few meta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber-archive / idl / test / idl.js View on Github external
assert.equal(
            data[1].upstream.meta.version,
            now + 2000,
            'Correct version'
        );

        // Fetch A locally
        assert.equal(
            data[2].local.idl['github.com'].org.a['service.thrift'],
            thriftIdl('A'),
            'Correct thrift A file locally'
        );

        assert.equal(
            data[2].local.idl['meta.json'].version,
            now + 1000,
            'Correct meta.json version'
        );

        assert.equal(
            data[2].local.idl['meta.json'].remotes['github.com/org/a'].time,
            (new Date(now + 1000)).toISOString(),
            'Correct version of A'
        );

        // Fetch B locally
        assert.equal(
            data[3].local.idl['github.com'].org.b['service.thrift'],
            thriftIdl('B'),
            'Correct thrift B file locally'
        );
github curiositry / ReaDB / common.js View on Github external
selector: function (searchObject, options, aggregation) {
      let selector = this.defaultConfiguration().selector(searchObject, options, aggregation),
        categoryFilter = options.search.props.categoryFilter;

      if (_.isString(categoryFilter) && !_.isEmpty(categoryFilter)) {
        selector.category = categoryFilter;
      }
      selector["meta.userId"] = options.search.userId;
      
      // selector["$or"] = [{"title":"rework"}];
      // 
      console.log(options.search.userId);
      console.log(JSON.stringify(selector));

      return selector;
    }
  }),
github webiny / Webiny / Cli / Build / webpack / plugins / ChunkBundlerPlugin.js View on Github external
_.each(resolvedPaths, (paths, url) => {
                    mappedChunks[url] = [];
                    compilation.chunks.map(chunk => {
                        chunk.mapModules(module => {
                            if (module.resource && paths.includes(module.resource)) {
                                mappedChunks[url].push(
                                    (process.env.NODE_ENV !== 'production' ? '// ' + chunk.files[0] + "\n\n" : '') + compilation.assets[chunk.files[0]].source()
                                );
                            }
                        });
                    });
                });

                let index = 0;
                // Write new meta
                let meta = JSON.parse(compilation.assets['meta.json'].source());
                _.each(mappedChunks, (source, url) => {
                    const src = source.join('');
                    const bundleFile = 'bundles/bundle-' + index + '.js';
                    compilation.assets[bundleFile] = {
                        source: () => src,
                        size: () => src.length
                    };
                    _.set(meta, 'bundles.' + url, compiler.options.output.publicPath + bundleFile);
                    index++;
                });

                // Assign new meta.json to output assets
                meta = JSON.stringify(meta, null, 4);
                compilation.assets['meta.json'] = {
                    source: () => meta,
                    size: () => meta.length
github oaeproject / Hilary / node_modules / oae-email / lib / api.js View on Github external
if (htmlContent || txtContent) {
        // If one of HTML or TXT templates managed to render, we will send the email with the content we have
        renderedTemplates['meta.json'] = metaContent;
        renderedTemplates['html'] = htmlContent;
        renderedTemplates['txt'] = txtContent;
    } else {
        return callback({'code': 500, 'msg': 'Could not parse a suitable content template for user'});
    }

    // If the `from` header is not set, we generate an intelligent `from` header based on the tenant host
    var tenant = TenantsAPI.getTenant(toUser.tenant.alias);
    var from = EmailConfig.getValue(tenant.alias, 'general', 'from') || util.format('"Apereo OAE" ', tenant.host);

    // Build the email object that will be sent through nodemailer. The 'from' property can be overridden by
    // the meta.json, then we further override that with some hard values
    var emailInfo = _.extend({'from': from}, renderedTemplates['meta.json'], {
        'to': toUser.email
    });

    if (renderedTemplates['txt']) {
        emailInfo.text = renderedTemplates['txt'];
    }

    if (renderedTemplates['html']) {
        emailInfo.html = renderedTemplates['html'];
    }

    // Ensure the hash is set and is a valid hex string
    opts.hash = _generateMessageHash(emailInfo, opts);

    // Set the Message-Id header based on the message hash. We apply the
    // tenant host as the FQDN as it improves the spam score by providing
github webiny / Webiny / Cli / Build / webpack / plugins / ChunkBundlerPlugin.js View on Github external
// Write new meta
                let meta = JSON.parse(compilation.assets['meta.json'].source());
                _.each(mappedChunks, (source, url) => {
                    const src = source.join('');
                    const bundleFile = 'bundles/bundle-' + index + '.js';
                    compilation.assets[bundleFile] = {
                        source: () => src,
                        size: () => src.length
                    };
                    _.set(meta, 'bundles.' + url, compiler.options.output.publicPath + bundleFile);
                    index++;
                });

                // Assign new meta.json to output assets
                meta = JSON.stringify(meta, null, 4);
                compilation.assets['meta.json'] = {
                    source: () => meta,
                    size: () => meta.length
                };

                compileCallback();
            });
        });
github oknosoft / metadata.js / examples / codex / js / codres.js View on Github external
$p.iface.oninit = function() {

	$p.job_prm.offline = true;

	// создаём основное окно
	$p.iface.layout_1c();
	$p.iface.docs.hideHeader();

	// говорим, что мы уже авторизованы на "сервере"
	$p.ajax.authorized = true;
	$p.ajax.root = true;

	// инициализируем метаданные
	new $p.Meta($p.injected_data['meta.json']);

	// загружаем данные
	$p.eve.from_json_to_data_obj($p.injected_data['data.json']);

};
github posm / OpenMapKitServer / jekyll / js / submissions / index.js View on Github external
function createHyperLinkIfNeeded(field, object) {
    if (typeof field === 'string') {
        // a hyperlink
        if (field.indexOf('http') === 0) {
            return '<a href="' + field + '">' + field + '</a>';
        }
        if (typeof object === 'object') {
            // a file with an extension, discern a link
            var metaInstanceId = object['meta.instanceId'];
            var formId = object['meta.formId'];
            if (typeof metaInstanceId === 'string'
                &amp;&amp; typeof formId === 'string'
                &amp;&amp; field[field.length - 4] === '.') {
                var uuid = metaInstanceId.replace('uuid:', '');
                var href = OMK.omkServerUrl() + '/omk/data/submissions/' + formId + '/' + uuid + '/' + field;
                return '<a href="' + href + '">' + field + '</a>';
            }
        }
    }
    return field;
}
github posm / OpenMapKitServer / jekyll / js / submissions / index.js View on Github external
function createHyperLinkIfNeeded(field, object) {
    if (typeof field === 'string') {
        // a hyperlink
        if (field.indexOf('http') === 0) {
            return '<a href="' + field + '">' + field + '</a>';
        }
        if (typeof object === 'object') {
            // a file with an extension, discern a link
            var metaInstanceId = object['meta.instanceId'];
            var formId = object['meta.formId'];
            if (typeof metaInstanceId === 'string'
                &amp;&amp; typeof formId === 'string'
                &amp;&amp; field[field.length - 4] === '.') {
                var uuid = metaInstanceId.replace('uuid:', '');
                var href = OMK.omkServerUrl() + '/omk/data/submissions/' + formId + '/' + uuid + '/' + field;
                return '<a href="' + href + '">' + field + '</a>';
            }
        }
    }
    return field;
}
github uber-archive / idl / test / idl.js View on Github external
function onResults(err, results) {
        if (err) {
            return callback(err);
        }
        if (results &&
            results.local &&
            results.local.idl &&
            results.local.idl['meta.json']) {
            results.local.idl['meta.json'] = JSON.parse(
                results.local.idl['meta.json']
            );
        }

        results.stdout = stdout;
        results.stderr = stderr;

        callback(null, results);
    }
}
github uber-archive / idl / test / idl.js View on Github external
function onResults(err, results) {
        if (err) {
            return callback(err);
        }
        if (results &&
            results.local &&
            results.local.idl &&
            results.local.idl['meta.json']) {
            results.local.idl['meta.json'] = JSON.parse(
                results.local.idl['meta.json']
            );
        }

        results.stdout = stdout;
        results.stderr = stderr;

        callback(null, results);
    }
}

meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?

MIT
Latest version published 4 years ago

Package Health Score

48 / 100
Full package analysis