Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dataform/core

Package Overview
Dependencies
Maintainers
2
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dataform/core - npm Package Compare versions

Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5

4

package.json
{
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"homepage": "https://github.com/dataform-co/dataform",

@@ -24,3 +24,3 @@ "license": "MIT",

"dependencies": {
"@dataform/protos": "1.0.0-alpha.4",
"@dataform/protos": "1.0.0-alpha.5",
"moo": "^0.5.0",

@@ -27,0 +27,0 @@ "protobufjs": "^6.8.8"

@@ -97,11 +97,5 @@ (function (factory) {

})();
if (actionOptions.sqlxConfig.schema) {
action.proto.target.schema = actionOptions.sqlxConfig.schema;
if (action.proto.target) {
action.proto.target = this.target(actionOptions.sqlxConfig.name, actionOptions.sqlxConfig.schema);
}
if (actionOptions.sqlxConfig.name) {
action.proto.name = actionOptions.sqlxConfig.name;
if (action.proto.target) {
action.proto.target.name = actionOptions.sqlxConfig.name;
}
}
return action;

@@ -231,2 +225,2 @@ }

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2NvcmUvc2Vzc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztJQUFBLDBEQUFvRDtJQUNwRCx3REFBbUU7SUFDbkUsd0RBQW1FO0lBQ25FLGdEQUFvRTtJQUNwRSw4Q0FBOEM7SUFDOUMsNkNBQTRDO0lBZTVDLE1BQWEsT0FBTztRQVdsQixZQUFZLE9BQWUsRUFBRSxhQUF1QztZQUNsRSxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FB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iAgICBjb25zdCBmaWxlTmFtZSA9IHBhdGggfHwgdXRpbHMuZ2V0Q2FsbGVyRmlsZSh0aGlzLnJvb3REaXIpIHx8IF9fZmlsZW5hbWU7XG5cbiAgICBjb25zdCBjb21waWxlRXJyb3IgPSBkYXRhZm9ybS5Db21waWxhdGlvbkVycm9yLmNyZWF0ZSh7XG4gICAgICBmaWxlTmFtZVxuICAgIH0pO1xuICAgIGlmICh0eXBlb2YgZXJyID09PSBcInN0cmluZ1wiKSB7XG4gICAgICBjb21waWxlRXJyb3IubWVzc2FnZSA9IGVycjtcbiAgICB9IGVsc2Uge1xuICAgICAgY29tcGlsZUVycm9yLm1lc3NhZ2UgPSBlcnIubWVzc2FnZTtcbiAgICAgIGNvbXBpbGVFcnJvci5zdGFjayA9IGVyci5zdGFjaztcbiAgICB9XG4gICAgdGhpcy5ncmFwaEVycm9ycy5jb21waWxhdGlvbkVycm9ycy5wdXNoKGNvbXBpbGVFcnJvcik7XG4gIH1cblxuICBwdWJsaWMgY29tcGlsZUdyYXBoQ2h1bms8VD4ocGFydDoge1xuICAgIFtuYW1lOiBzdHJpbmddOiB7IHByb3RvOiBJQWN0aW9uUHJvdG87IGNvbXBpbGUoKTogVCB9O1xuICB9KTogVFtdIHtcbiAgICBjb25zdCBjb21waWxlZENodW5rczogVFtdID0gW107XG5cbiAgICBPYmplY3Qua2V5cyhwYXJ0KS5mb3JFYWNoKGtleSA9PiB7XG4gICAgICB0cnkge1xuICAgICAgICBjb25zdCBjb21waWxlZENodW5rID0gcGFydFtrZXldLmNvbXBpbGUoKTtcbiAgICAgICAgY29tcGlsZWRDaHVua3MucHVzaChjb21waWxlZENodW5rKTtcbiAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgdGhpcy5jb21waWxlRXJyb3IoZSwgcGFydFtrZXldLnByb3RvLmZpbGVOYW1lKTtcbiAgICAgIH1cbiAgICB9KTtcblxuICAgIHJldHVybiBjb21waWxlZENodW5rcztcbiAgfVxuXG4gIHB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m1hbGx5LlxuICAgICAgZGVwZW5kZW5jaWVzXG4gICAgICAgIC5maWx0ZXIoZGVwZW5kZW5jeSA9PiAhZGVwZW5kZW5jeS5pbmNsdWRlcyhcIipcIikpXG4gICAgICAgIC5mb3JFYWNoKGRlcGVuZGVuY3kgPT4gKHVuaXF1ZURlcGVuZGVuY2llc1tkZXBlbmRlbmN5XSA9IHRydWUpKTtcbiAgICAgIC8vIE1hdGNoIHdpbGRjYXJkIGRlcHMgYWdhaW5zdCBhbGwgYWN0aW9uIG5hbWVzLlxuICAgICAgdXRpbHNcbiAgICAgICAgLm1hdGNoUGF0dGVybnMoZGVwZW5kZW5jaWVzLmZpbHRlcihkID0+IGQuaW5jbHVkZXMoXCIqXCIpKSwgYWxsQWN0aW9uTmFtZXMpXG4gICAgICAgIC5mb3JFYWNoKGRlcGVuZGVuY3kgPT4gKHVuaXF1ZURlcGVuZGVuY2llc1tkZXBlbmRlbmN5XSA9IHRydWUpKTtcbiAgICAgIGFjdGlvbi5kZXBlbmRlbmNpZXMgPSBPYmplY3Qua2V5cyh1bmlxdWVEZXBlbmRlbmNpZXMpO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIGNvbXBpbGVkR3JhcGg7XG4gIH1cblxuICBwdWJsaWMgaXNEYXRhc2V0VHlwZSh0eXBlKSB7XG4gICAgcmV0dXJuIHR5cGUgPT09IFwidmlld1wiIHx8IHR5cGUgPT09IFwidGFibGVcIiB8fCB0eXBlID09PSBcImlubGluZVwiIHx8IHR5cGUgPT09IFwiaW5jcmVtZW50YWxcIjtcbiAgfVxufVxuIl19
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc