@web3api/core-js
Advanced tools
Comparing version 0.0.1-prealpha.80 to 0.0.1-prealpha.81
@@ -7,2 +7,2 @@ /** | ||
import { DeserializeManifestOptions } from "../../"; | ||
export declare const deserializeBuildManifest: (manifest: string, options?: DeserializeManifestOptions | undefined) => import("./0.0.1-prealpha.2").BuildManifest; | ||
export declare const deserializeBuildManifest: (manifest: string, options?: DeserializeManifestOptions | undefined) => import("./0.0.1-prealpha.3").BuildManifest; |
@@ -8,12 +8,14 @@ /** | ||
import { BuildManifest as BuildManifest0_0_1_prealpha_2 } from "./0.0.1-prealpha.2"; | ||
export { BuildManifest0_0_1_prealpha_1, BuildManifest0_0_1_prealpha_2, }; | ||
import { BuildManifest as BuildManifest0_0_1_prealpha_3 } from "./0.0.1-prealpha.3"; | ||
export { BuildManifest0_0_1_prealpha_1, BuildManifest0_0_1_prealpha_2, BuildManifest0_0_1_prealpha_3, }; | ||
export declare enum BuildManifestFormats { | ||
"0.0.1-prealpha.1" = "0.0.1-prealpha.1", | ||
"0.0.1-prealpha.2" = "0.0.1-prealpha.2" | ||
"0.0.1-prealpha.2" = "0.0.1-prealpha.2", | ||
"0.0.1-prealpha.3" = "0.0.1-prealpha.3" | ||
} | ||
export declare type AnyBuildManifest = BuildManifest0_0_1_prealpha_1 | BuildManifest0_0_1_prealpha_2; | ||
export declare type BuildManifest = BuildManifest0_0_1_prealpha_2; | ||
export declare const latestBuildManifestFormat = BuildManifestFormats["0.0.1-prealpha.2"]; | ||
export declare type AnyBuildManifest = BuildManifest0_0_1_prealpha_1 | BuildManifest0_0_1_prealpha_2 | BuildManifest0_0_1_prealpha_3; | ||
export declare type BuildManifest = BuildManifest0_0_1_prealpha_3; | ||
export declare const latestBuildManifestFormat = BuildManifestFormats["0.0.1-prealpha.3"]; | ||
export { migrateBuildManifest } from "./migrate"; | ||
export { deserializeBuildManifest } from "./deserialize"; | ||
export { validateBuildManifest } from "./validate"; |
@@ -14,4 +14,5 @@ "use strict"; | ||
BuildManifestFormats["0.0.1-prealpha.2"] = "0.0.1-prealpha.2"; | ||
BuildManifestFormats["0.0.1-prealpha.3"] = "0.0.1-prealpha.3"; | ||
})(BuildManifestFormats = exports.BuildManifestFormats || (exports.BuildManifestFormats = {})); | ||
exports.latestBuildManifestFormat = BuildManifestFormats["0.0.1-prealpha.2"]; | ||
exports.latestBuildManifestFormat = BuildManifestFormats["0.0.1-prealpha.3"]; | ||
var migrate_1 = require("./migrate"); | ||
@@ -18,0 +19,0 @@ Object.defineProperty(exports, "migrateBuildManifest", { enumerable: true, get: function () { return migrate_1.migrateBuildManifest; } }); |
@@ -11,3 +11,3 @@ /** | ||
export declare const migrators: Migrator; | ||
export declare const migrateBuildManifest: (manifest: AnyBuildManifest, to: BuildManifestFormats) => import("./0.0.1-prealpha.2").BuildManifest; | ||
export declare const migrateBuildManifest: (manifest: AnyBuildManifest, to: BuildManifestFormats) => import("./0.0.1-prealpha.3").BuildManifest; | ||
export {}; |
@@ -11,6 +11,8 @@ "use strict"; | ||
var _1 = require("."); | ||
var _0_0_1_prealpha_1_to_0_0_1_prealpha_2_1 = require("./migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.2"); | ||
var _0_0_1_prealpha_1_to_0_0_1_prealpha_3_1 = require("./migrators/0.0.1-prealpha.1_to_0.0.1-prealpha.3"); | ||
var _0_0_1_prealpha_2_to_0_0_1_prealpha_3_1 = require("./migrators/0.0.1-prealpha.2_to_0.0.1-prealpha.3"); | ||
var tracing_js_1 = require("@web3api/tracing-js"); | ||
exports.migrators = { | ||
"0.0.1-prealpha.1": _0_0_1_prealpha_1_to_0_0_1_prealpha_2_1.migrate, | ||
"0.0.1-prealpha.1": _0_0_1_prealpha_1_to_0_0_1_prealpha_3_1.migrate, | ||
"0.0.1-prealpha.2": _0_0_1_prealpha_2_to_0_0_1_prealpha_3_1.migrate, | ||
}; | ||
@@ -17,0 +19,0 @@ exports.migrateBuildManifest = tracing_js_1.Tracer.traceFunc("core: migrateBuildManifest", function (manifest, to) { |
@@ -49,2 +49,3 @@ "use strict"; | ||
var _0_0_1_prealpha_2_json_1 = __importDefault(require("@web3api/manifest-schemas/formats/web3api.build/0.0.1-prealpha.2.json")); | ||
var _0_0_1_prealpha_3_json_1 = __importDefault(require("@web3api/manifest-schemas/formats/web3api.build/0.0.1-prealpha.3.json")); | ||
var tracing_js_1 = require("@web3api/tracing-js"); | ||
@@ -55,2 +56,3 @@ var jsonschema_1 = require("jsonschema"); | ||
"0.0.1-prealpha.2": _0_0_1_prealpha_2_json_1.default, | ||
"0.0.1-prealpha.3": _0_0_1_prealpha_3_json_1.default, | ||
}; | ||
@@ -62,2 +64,4 @@ var validator = new jsonschema_1.Validator(); | ||
jsonschema_1.Validator.prototype.customFormats.regexString = Validators.regexString; | ||
jsonschema_1.Validator.prototype.customFormats.directory = Validators.directory; | ||
jsonschema_1.Validator.prototype.customFormats.buildxOutput = Validators.buildxOutput; | ||
exports.validateBuildManifest = tracing_js_1.Tracer.traceFunc("core: validateBuildManifest", function (manifest, extSchema) { | ||
@@ -64,0 +68,0 @@ if (extSchema === void 0) { extSchema = undefined; } |
@@ -19,1 +19,3 @@ export declare function file(path: unknown): boolean; | ||
export declare function schemaFile(filePath: unknown): boolean; | ||
export declare function directory(path: unknown): boolean; | ||
export declare function buildxOutput(output: unknown): boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.schemaFile = exports.web3apiUri = exports.regexString = exports.manifestFile = exports.yamlFile = exports.jsonFile = exports.graphqlFile = exports.websiteUrl = exports.imageFile = exports.appLanguage = exports.pluginLanguage = exports.wasmLanguage = exports.dockerImageId = exports.dockerfileName = exports.dockerImageName = exports.packageTag = exports.packageName = exports.file = void 0; | ||
exports.buildxOutput = exports.directory = exports.schemaFile = exports.web3apiUri = exports.regexString = exports.manifestFile = exports.yamlFile = exports.jsonFile = exports.graphqlFile = exports.websiteUrl = exports.imageFile = exports.appLanguage = exports.pluginLanguage = exports.wasmLanguage = exports.dockerImageId = exports.dockerfileName = exports.dockerImageName = exports.packageTag = exports.packageName = exports.file = void 0; | ||
var types_1 = require("../types"); | ||
@@ -119,2 +119,29 @@ function file(path) { | ||
exports.schemaFile = schemaFile; | ||
function directory(path) { | ||
if (typeof path === "boolean") { | ||
return true; | ||
} | ||
if (typeof path !== "string") { | ||
return false; | ||
} | ||
var validDirRegex = /^\/?[\w\-/]+$/; | ||
return !!validDirRegex.test(path); | ||
} | ||
exports.directory = directory; | ||
function buildxOutput(output) { | ||
if (typeof output === "boolean") { | ||
return true; | ||
} | ||
if (typeof output !== "string") { | ||
return false; | ||
} | ||
switch (output) { | ||
case "docker": | ||
case "registry": | ||
return true; | ||
default: | ||
return false; | ||
} | ||
} | ||
exports.buildxOutput = buildxOutput; | ||
//# sourceMappingURL=validators.js.map |
{ | ||
"name": "@web3api/core-js", | ||
"description": "Web3API Javascript Core", | ||
"version": "0.0.1-prealpha.80", | ||
"version": "0.0.1-prealpha.81", | ||
"license": "MIT", | ||
@@ -18,4 +18,4 @@ "repository": { | ||
"lint": "eslint --color -c ../../../.eslintrc.js src/", | ||
"test": "jest --passWithNoTests --runInBand --verbose", | ||
"test:ci": "jest --passWithNoTests --runInBand --verbose", | ||
"test": "jest --passWithNoTests --runInBand --verbose --onlyChanged", | ||
"test:ci": "jest --passWithNoTests --runInBand --verbose --onlyChanged", | ||
"test:watch": "jest --watch --passWithNoTests --verbose" | ||
@@ -25,4 +25,4 @@ }, | ||
"@msgpack/msgpack": "2.7.2", | ||
"@web3api/manifest-schemas": "0.0.1-prealpha.80", | ||
"@web3api/tracing-js": "0.0.1-prealpha.80", | ||
"@web3api/manifest-schemas": "0.0.1-prealpha.81", | ||
"@web3api/tracing-js": "0.0.1-prealpha.81", | ||
"graphql": "15.5.0", | ||
@@ -38,3 +38,3 @@ "graphql-tag": "2.10.4", | ||
"@types/semver": "7.3.8", | ||
"@web3api/os-js": "0.0.1-prealpha.80", | ||
"@web3api/os-js": "0.0.1-prealpha.81", | ||
"jest": "26.6.3", | ||
@@ -48,3 +48,3 @@ "json-schema-to-typescript": "10.1.3", | ||
}, | ||
"gitHead": "1ba6782929ddae44866ec9e59e14b6ada4785bb2", | ||
"gitHead": "99dd08378e51809acaf96a61aa146a128d697f7d", | ||
"publishConfig": { | ||
@@ -51,0 +51,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
305758
327
5126
+ Added@web3api/manifest-schemas@0.0.1-prealpha.81(transitive)
+ Added@web3api/tracing-js@0.0.1-prealpha.81(transitive)
- Removed@web3api/manifest-schemas@0.0.1-prealpha.80(transitive)
- Removed@web3api/tracing-js@0.0.1-prealpha.80(transitive)