zephyr-edge-contract 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +11 -6
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/api-contract-negotiation/get-api-contract.d.ts +7 -6
- package/dist/lib/api-contract-negotiation/get-api-contract.js +9 -7
- package/dist/lib/api-contract-negotiation/get-api-contract.js.map +1 -1
- package/dist/lib/edge-api/publish-request.d.ts +28 -0
- package/dist/lib/edge-api/publish-request.js +3 -0
- package/dist/lib/edge-api/publish-request.js.map +1 -0
- package/dist/lib/node-persist/app-deploy-result-cache.d.ts +7 -0
- package/dist/lib/node-persist/app-deploy-result-cache.js +33 -0
- package/dist/lib/node-persist/app-deploy-result-cache.js.map +1 -0
- package/dist/lib/node-persist/application-configuration.js +1 -1
- package/dist/lib/node-persist/application-configuration.js.map +1 -1
- package/dist/lib/node-persist/hash-cache.js.map +1 -1
- package/dist/lib/node-persist/storage-keys.d.ts +2 -1
- package/dist/lib/node-persist/token.js +5 -0
- package/dist/lib/node-persist/token.js.map +1 -1
- package/dist/lib/utils/debug-enabled.d.ts +1 -0
- package/dist/lib/utils/debug-enabled.js +9 -0
- package/dist/lib/utils/debug-enabled.js.map +1 -0
- package/dist/lib/utils/debug.d.ts +4 -24
- package/dist/lib/utils/debug.js +12 -57
- package/dist/lib/utils/debug.js.map +1 -1
- package/dist/lib/utils/error-types.d.ts +4 -15
- package/dist/lib/utils/error-types.js +27 -27
- package/dist/lib/utils/error-types.js.map +1 -1
- package/dist/lib/utils/picocolor.js +23 -21
- package/dist/lib/utils/picocolor.js.map +1 -1
- package/dist/lib/utils/ze-http-request.js +2 -2
- package/dist/lib/utils/ze-http-request.js.map +1 -1
- package/dist/lib/zephyr-build-stats.d.ts +80 -0
- package/dist/lib/zephyr-build-stats.js +11 -0
- package/dist/lib/zephyr-build-stats.js.map +1 -0
- package/dist/lib/zephyr-edge-contract.d.ts +3 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,16 +8,21 @@ export * from './lib/zephyr-edge-contract';
|
|
|
8
8
|
export * as _hash_cache from './lib/node-persist/hash-cache';
|
|
9
9
|
export * as _fs_cache from './lib/node-persist/fs-cache';
|
|
10
10
|
export { ZeApplicationConfig, NetlifyIntegrationConfig, getAppConfig, remoteAppConfig, saveAppConfig, } from './lib/node-persist/application-configuration';
|
|
11
|
-
export
|
|
11
|
+
export * from './lib/utils/picocolor';
|
|
12
|
+
export { getPartialAssetMap, removePartialAssetMap, savePartialAssetMap } from './lib/node-persist/partial-assets-map';
|
|
12
13
|
export { getSecretToken } from './lib/node-persist/secret-token';
|
|
13
|
-
export { saveToken, getToken, removeToken, cleanTokens
|
|
14
|
+
export { saveToken, getToken, removeToken, cleanTokens } from './lib/node-persist/token';
|
|
14
15
|
export { ZephyrPluginOptions } from './lib/plugin-options/zephyr-plugin-options';
|
|
15
|
-
export { ZEPHYR_API_ENDPOINT,
|
|
16
|
-
export * as color from
|
|
17
|
-
export
|
|
16
|
+
export { ZEPHYR_API_ENDPOINT, ZE_API_ENDPOINT, ze_api_gateway } from './lib/api-contract-negotiation/get-api-contract';
|
|
17
|
+
export * as color from './lib/utils/picocolor';
|
|
18
|
+
export * from './lib/utils/debug-enabled';
|
|
19
|
+
export { ze_log, ze_error, brightBlueBgName, brightRedBgName, brightYellowBgName, dimmedName } from './lib/utils/debug';
|
|
18
20
|
export { safe_json_parse } from './lib/utils/safe-json-parse';
|
|
19
21
|
export { request } from './lib/utils/ze-http-request';
|
|
20
|
-
export * as colors from
|
|
22
|
+
export * as colors from './lib/utils/picocolor';
|
|
21
23
|
export { LocalPackageJson } from './lib/ze-api/local-package-json';
|
|
22
24
|
export { ConvertedGraph } from './lib/ze-api/converted-graph';
|
|
23
25
|
export * from './lib/node-persist/upload-provider-options';
|
|
26
|
+
export * as appDeployResultCache from './lib/node-persist/app-deploy-result-cache';
|
|
27
|
+
export { ZephyrBuildStats } from './lib/zephyr-build-stats';
|
|
28
|
+
export { PublishRequest, StageZeroPublishRequest } from './lib/edge-api/publish-request';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.colors = exports.request = exports.safe_json_parse = exports.dimmedName = exports.brightYellowBgName = exports.brightRedBgName = exports.brightBlueBgName = exports.
|
|
3
|
+
exports.appDeployResultCache = exports.colors = exports.request = exports.safe_json_parse = exports.dimmedName = exports.brightYellowBgName = exports.brightRedBgName = exports.brightBlueBgName = exports.ze_error = exports.ze_log = exports.color = exports.ze_api_gateway = exports.ZE_API_ENDPOINT = exports.ZEPHYR_API_ENDPOINT = exports.cleanTokens = exports.removeToken = exports.getToken = exports.saveToken = exports.getSecretToken = exports.savePartialAssetMap = exports.removePartialAssetMap = exports.getPartialAssetMap = exports.saveAppConfig = exports.remoteAppConfig = exports.getAppConfig = exports._fs_cache = exports._hash_cache = exports.createSnapshotId = exports.createApplicationUID = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var create_application_u_i_d_1 = require("./lib/utils/create-application-u-i-d");
|
|
6
6
|
Object.defineProperty(exports, "createApplicationUID", { enumerable: true, get: function () { return create_application_u_i_d_1.createApplicationUID; } });
|
|
@@ -13,6 +13,7 @@ var application_configuration_1 = require("./lib/node-persist/application-config
|
|
|
13
13
|
Object.defineProperty(exports, "getAppConfig", { enumerable: true, get: function () { return application_configuration_1.getAppConfig; } });
|
|
14
14
|
Object.defineProperty(exports, "remoteAppConfig", { enumerable: true, get: function () { return application_configuration_1.remoteAppConfig; } });
|
|
15
15
|
Object.defineProperty(exports, "saveAppConfig", { enumerable: true, get: function () { return application_configuration_1.saveAppConfig; } });
|
|
16
|
+
tslib_1.__exportStar(require("./lib/utils/picocolor"), exports);
|
|
16
17
|
var partial_assets_map_1 = require("./lib/node-persist/partial-assets-map");
|
|
17
18
|
Object.defineProperty(exports, "getPartialAssetMap", { enumerable: true, get: function () { return partial_assets_map_1.getPartialAssetMap; } });
|
|
18
19
|
Object.defineProperty(exports, "removePartialAssetMap", { enumerable: true, get: function () { return partial_assets_map_1.removePartialAssetMap; } });
|
|
@@ -26,12 +27,13 @@ Object.defineProperty(exports, "removeToken", { enumerable: true, get: function
|
|
|
26
27
|
Object.defineProperty(exports, "cleanTokens", { enumerable: true, get: function () { return token_1.cleanTokens; } });
|
|
27
28
|
var get_api_contract_1 = require("./lib/api-contract-negotiation/get-api-contract");
|
|
28
29
|
Object.defineProperty(exports, "ZEPHYR_API_ENDPOINT", { enumerable: true, get: function () { return get_api_contract_1.ZEPHYR_API_ENDPOINT; } });
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "ZE_API_ENDPOINT", { enumerable: true, get: function () { return get_api_contract_1.ZE_API_ENDPOINT; } });
|
|
31
|
+
Object.defineProperty(exports, "ze_api_gateway", { enumerable: true, get: function () { return get_api_contract_1.ze_api_gateway; } });
|
|
30
32
|
exports.color = tslib_1.__importStar(require("./lib/utils/picocolor"));
|
|
33
|
+
tslib_1.__exportStar(require("./lib/utils/debug-enabled"), exports);
|
|
31
34
|
var debug_1 = require("./lib/utils/debug");
|
|
32
35
|
Object.defineProperty(exports, "ze_log", { enumerable: true, get: function () { return debug_1.ze_log; } });
|
|
33
36
|
Object.defineProperty(exports, "ze_error", { enumerable: true, get: function () { return debug_1.ze_error; } });
|
|
34
|
-
Object.defineProperty(exports, "is_debug_enabled", { enumerable: true, get: function () { return debug_1.is_debug_enabled; } });
|
|
35
37
|
Object.defineProperty(exports, "brightBlueBgName", { enumerable: true, get: function () { return debug_1.brightBlueBgName; } });
|
|
36
38
|
Object.defineProperty(exports, "brightRedBgName", { enumerable: true, get: function () { return debug_1.brightRedBgName; } });
|
|
37
39
|
Object.defineProperty(exports, "brightYellowBgName", { enumerable: true, get: function () { return debug_1.brightYellowBgName; } });
|
|
@@ -42,4 +44,5 @@ var ze_http_request_1 = require("./lib/utils/ze-http-request");
|
|
|
42
44
|
Object.defineProperty(exports, "request", { enumerable: true, get: function () { return ze_http_request_1.request; } });
|
|
43
45
|
exports.colors = tslib_1.__importStar(require("./lib/utils/picocolor"));
|
|
44
46
|
tslib_1.__exportStar(require("./lib/node-persist/upload-provider-options"), exports);
|
|
47
|
+
exports.appDeployResultCache = tslib_1.__importStar(require("./lib/node-persist/app-deploy-result-cache"));
|
|
45
48
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,iFAA4E;AAAnE,gIAAA,oBAAoB,OAAA;AAC7B,qEAAkE;AAAzD,sHAAA,gBAAgB,OAAA;AAOzB,qEAA2C;AAE3C,qFAA6D;AAC7D,iFAAyD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,iFAA4E;AAAnE,gIAAA,oBAAoB,OAAA;AAC7B,qEAAkE;AAAzD,sHAAA,gBAAgB,OAAA;AAOzB,qEAA2C;AAE3C,qFAA6D;AAC7D,iFAAyD;AACzD,0FAMsD;AAHpD,yHAAA,YAAY,OAAA;AACZ,4HAAA,eAAe,OAAA;AACf,0HAAA,aAAa,OAAA;AAEf,gEAAsC;AACtC,4EAAuH;AAA9G,wHAAA,kBAAkB,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAAE,yHAAA,mBAAmB,OAAA;AAEvE,gEAAiE;AAAxD,8GAAA,cAAc,OAAA;AAEvB,kDAAyF;AAAhF,kGAAA,SAAS,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAAE,oGAAA,WAAW,OAAA;AAAE,oGAAA,WAAW,OAAA;AAItD,oFAAuH;AAA9G,uHAAA,mBAAmB,OAAA;AAAE,mHAAA,eAAe,OAAA;AAAE,kHAAA,cAAc,OAAA;AAC7D,uEAA+C;AAC/C,oEAA0C;AAC1C,2CAAwH;AAA/G,+FAAA,MAAM,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAAE,mGAAA,UAAU,OAAA;AAC5F,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AACxB,+DAAsD;AAA7C,0GAAA,OAAO,OAAA;AAChB,wEAAgD;AAIhD,qFAA2D;AAC3D,2GAAmF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare const ZEPHYR_API_ENDPOINT: () => string;
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
export declare const ZE_API_ENDPOINT: () => string;
|
|
3
|
+
export declare const ze_api_gateway: {
|
|
4
|
+
logs: string;
|
|
5
|
+
build_stats: string;
|
|
6
|
+
auth_link: string;
|
|
7
|
+
resolve: string;
|
|
8
|
+
application_config: string;
|
|
8
9
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ze_api_gateway = exports.ZE_API_ENDPOINT = exports.ZEPHYR_API_ENDPOINT = void 0;
|
|
4
4
|
const ZEPHYR_API_ENDPOINT = () => { var _a; return (_a = process.env['ZE_API']) !== null && _a !== void 0 ? _a : 'https://api.zephyr-cloud.io'; };
|
|
5
5
|
exports.ZEPHYR_API_ENDPOINT = ZEPHYR_API_ENDPOINT;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const ZE_API_ENDPOINT = () => { var _a; return (_a = process.env['ZE_API_GATE']) !== null && _a !== void 0 ? _a : 'https://zeapi.valorkin.dev'; };
|
|
7
|
+
exports.ZE_API_ENDPOINT = ZE_API_ENDPOINT;
|
|
8
|
+
exports.ze_api_gateway = {
|
|
9
|
+
logs: '/logs',
|
|
10
|
+
build_stats: '/build-stats',
|
|
11
|
+
auth_link: '/auth-link',
|
|
12
|
+
resolve: '/resolve',
|
|
13
|
+
application_config: '/application-config',
|
|
12
14
|
};
|
|
13
15
|
//# sourceMappingURL=get-api-contract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-api-contract.js","sourceRoot":"","sources":["../../../src/lib/api-contract-negotiation/get-api-contract.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"get-api-contract.js","sourceRoot":"","sources":["../../../src/lib/api-contract-negotiation/get-api-contract.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,GAAG,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,mCAAI,6BAA6B,CAAA,EAAA,CAAC;AAAnF,QAAA,mBAAmB,uBAAgE;AAEzF,MAAM,eAAe,GAAG,GAAG,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,mCAAI,4BAA4B,CAAA,EAAA,CAAC;AAAnF,QAAA,eAAe,mBAAoE;AAEnF,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,UAAU;IACnB,kBAAkB,EAAE,qBAAqB;CAC1C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface PublishTarget {
|
|
2
|
+
url: string;
|
|
3
|
+
hostname: string;
|
|
4
|
+
}
|
|
5
|
+
export interface PublishRequest {
|
|
6
|
+
EDGE_URL: string;
|
|
7
|
+
application_uid: string;
|
|
8
|
+
app_version: {
|
|
9
|
+
snapshot_id?: string;
|
|
10
|
+
};
|
|
11
|
+
snapshot_id?: string;
|
|
12
|
+
user_uuid: string;
|
|
13
|
+
username: string;
|
|
14
|
+
can_write: boolean;
|
|
15
|
+
targets: {
|
|
16
|
+
version?: PublishTarget;
|
|
17
|
+
tags?: PublishTarget[];
|
|
18
|
+
ens?: PublishTarget[];
|
|
19
|
+
cnames?: PublishTarget[];
|
|
20
|
+
};
|
|
21
|
+
jwt: string;
|
|
22
|
+
}
|
|
23
|
+
export interface StageZeroPublishRequest {
|
|
24
|
+
application_uid: string;
|
|
25
|
+
snapshot_id: string;
|
|
26
|
+
target: PublishTarget;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-request.js","sourceRoot":"","sources":["../../../src/lib/edge-api/publish-request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function setAppDeployResult(application_uid: string, value: {
|
|
2
|
+
urls: string[];
|
|
3
|
+
}): Promise<void>;
|
|
4
|
+
export declare function getAppDeployResult(application_uid: string): Promise<{
|
|
5
|
+
urls: string[];
|
|
6
|
+
} | undefined>;
|
|
7
|
+
export declare function removeAppDeployResult(application_uid: string): Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeAppDeployResult = exports.getAppDeployResult = exports.setAppDeployResult = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_persist_1 = require("node-persist");
|
|
6
|
+
const node_path_1 = require("node:path");
|
|
7
|
+
const node_os_1 = require("node:os");
|
|
8
|
+
const storage_keys_1 = require("./storage-keys");
|
|
9
|
+
const storage = (0, node_persist_1.init)({
|
|
10
|
+
dir: (0, node_path_1.join)((0, node_os_1.homedir)(), storage_keys_1.ZE_PATH),
|
|
11
|
+
});
|
|
12
|
+
function setAppDeployResult(application_uid, value) {
|
|
13
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
yield storage;
|
|
15
|
+
void (yield (0, node_persist_1.setItem)(`${"ze-app-deploy-result" /* StorageKeys.ze_app_deploy_result */}:${application_uid}`, value, { ttl: 1000 * 60 * 60 * 24 }));
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.setAppDeployResult = setAppDeployResult;
|
|
19
|
+
function getAppDeployResult(application_uid) {
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
yield storage;
|
|
22
|
+
return (0, node_persist_1.getItem)(`${"ze-app-deploy-result" /* StorageKeys.ze_app_deploy_result */}:${application_uid}`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.getAppDeployResult = getAppDeployResult;
|
|
26
|
+
function removeAppDeployResult(application_uid) {
|
|
27
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
yield storage;
|
|
29
|
+
yield (0, node_persist_1.removeItem)(`${"ze-app-deploy-result" /* StorageKeys.ze_app_deploy_result */}:${application_uid}`);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.removeAppDeployResult = removeAppDeployResult;
|
|
33
|
+
//# sourceMappingURL=app-deploy-result-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-deploy-result-cache.js","sourceRoot":"","sources":["../../../src/lib/node-persist/app-deploy-result-cache.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,yCAAiC;AACjC,qCAAkC;AAElC,iDAAsD;AAEtD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAsB,kBAAkB,CACtC,eAAuB,EACvB,KAAyB;;QAEzB,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EACjB,GAAG,6DAAgC,IAAI,eAAe,EAAE,EACxD,KAAK,EACL,EAAE,GAAG,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAC7B,CAAC,CAAC;IACL,CAAC;CAAA;AAVD,gDAUC;AAED,SAAsB,kBAAkB,CACtC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,GAAG,6DAAgC,IAAI,eAAe,EAAE,CAAC,CAAC;IAC3E,CAAC;CAAA;AALD,gDAKC;AAED,SAAsB,qBAAqB,CACzC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,EAAC,GAAG,6DAAgC,IAAI,eAAe,EAAE,CAAC,CAAC;IAC7E,CAAC;CAAA;AALD,sDAKC"}
|
|
@@ -15,7 +15,7 @@ function get_key(application_uid) {
|
|
|
15
15
|
function saveAppConfig(application_uid, json) {
|
|
16
16
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
yield storage;
|
|
18
|
-
void (yield (0, node_persist_1.setItem)(get_key(application_uid), json));
|
|
18
|
+
void (yield (0, node_persist_1.setItem)(get_key(application_uid), json, { ttl: 5 * 60 * 1000 }));
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
exports.saveAppConfig = saveAppConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application-configuration.js","sourceRoot":"","sources":["../../../src/lib/node-persist/application-configuration.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,qCAAkC;AAClC,yCAAiC;AAEjC,iDAAsD;AAyBtD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAS,OAAO,CAAC,eAAuB;IACtC,OAAO,uEAAkC,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,SAAsB,aAAa,
|
|
1
|
+
{"version":3,"file":"application-configuration.js","sourceRoot":"","sources":["../../../src/lib/node-persist/application-configuration.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,qCAAkC;AAClC,yCAAiC;AAEjC,iDAAsD;AAyBtD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAS,OAAO,CAAC,eAAuB;IACtC,OAAO,uEAAkC,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,CAAC;AAED,SAAsB,aAAa,CAAC,eAAuB,EAAE,IAAyB;;QACpF,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/E,CAAC;CAAA;AAHD,sCAGC;AAED,SAAsB,YAAY,CAAC,eAAuB;;QACxD,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3C,CAAC;CAAA;AAHD,oCAGC;AAED,SAAsB,eAAe,CAAC,eAAuB;;QAC3D,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7C,CAAC;CAAA;AAHD,0CAGC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash-cache.js","sourceRoot":"","sources":["../../../src/lib/node-persist/hash-cache.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,yCAAiC;AACjC,qCAAkC;AAClC,iDAAsD;AAEtD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAsB,eAAe,
|
|
1
|
+
{"version":3,"file":"hash-cache.js","sourceRoot":"","sources":["../../../src/lib/node-persist/hash-cache.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAClE,yCAAiC;AACjC,qCAAkC;AAClC,iDAAsD;AAEtD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAsB,eAAe,CACnC,eAAuB,EACvB,KAA2B;;QAE3B,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EACjB,GAAG,+CAAyB,IAAI,eAAe,EAAE,EACjD,KAAK,EACL,EAAE,GAAG,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAC7B,CAAC,CAAC;IACL,CAAC;CAAA;AAVD,0CAUC;AAED,SAAsB,eAAe,CACnC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,GAAG,+CAAyB,IAAI,eAAe,EAAE,CAAC,CAAC;IACpE,CAAC;CAAA;AALD,0CAKC;AAED,SAAsB,kBAAkB,CACtC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,EAAC,GAAG,+CAAyB,IAAI,eAAe,EAAE,CAAC,CAAC;IACtE,CAAC;CAAA;AALD,gDAKC"}
|
|
@@ -6,6 +6,7 @@ const node_persist_1 = require("node-persist");
|
|
|
6
6
|
const node_os_1 = require("node:os");
|
|
7
7
|
const node_path_1 = require("node:path");
|
|
8
8
|
const storage_keys_1 = require("./storage-keys");
|
|
9
|
+
const secret_token_1 = require("./secret-token");
|
|
9
10
|
const storage = (0, node_persist_1.init)({
|
|
10
11
|
dir: (0, node_path_1.join)((0, node_os_1.homedir)(), storage_keys_1.ZE_PATH),
|
|
11
12
|
});
|
|
@@ -18,6 +19,10 @@ function saveToken(token) {
|
|
|
18
19
|
exports.saveToken = saveToken;
|
|
19
20
|
function getToken() {
|
|
20
21
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const tokenFromEnv = yield (0, secret_token_1.getSecretToken)();
|
|
23
|
+
if (tokenFromEnv) {
|
|
24
|
+
return tokenFromEnv;
|
|
25
|
+
}
|
|
21
26
|
yield storage;
|
|
22
27
|
return (0, node_persist_1.getItem)("ze-auth-token" /* StorageKeys.ze_auth_token */);
|
|
23
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/lib/node-persist/token.ts"],"names":[],"mappings":";;;;AAAA,+CAAyE;AACzE,qCAAkC;AAClC,yCAAiC;AACjC,iDAAsD;
|
|
1
|
+
{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../src/lib/node-persist/token.ts"],"names":[],"mappings":";;;;AAAA,+CAAyE;AACzE,qCAAkC;AAClC,yCAAiC;AACjC,iDAAsD;AACtD,iDAAgD;AAEhD,MAAM,OAAO,GAAG,IAAA,mBAAI,EAAC;IACnB,GAAG,EAAE,IAAA,gBAAI,EAAC,IAAA,iBAAO,GAAE,EAAE,sBAAO,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAsB,SAAS,CAAC,KAAa;;QAC3C,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,mDAA4B,KAAK,CAAC,CAAC,CAAC;IACzD,CAAC;CAAA;AAHD,8BAGC;AAED,SAAsB,QAAQ;;QAC5B,MAAM,YAAY,GAAG,MAAM,IAAA,6BAAc,GAAE,CAAC;QAC5C,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,YAAY,CAAC;QACtB,CAAC;QACD,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,kDAA2B,CAAC;IAC5C,CAAC;CAAA;AAPD,4BAOC;AAED,SAAsB,WAAW;;QAC/B,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,yBAAU,kDAA2B,CAAC;IAC9C,CAAC;CAAA;AAHD,kCAGC;AAED,SAAsB,WAAW;;QAC/B,MAAM,OAAO,CAAC;QACd,MAAM,IAAA,oBAAK,GAAE,CAAC;IAChB,CAAC;CAAA;AAHD,kCAGC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const is_debug_enabled: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.is_debug_enabled = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const process = tslib_1.__importStar(require("node:process"));
|
|
7
|
+
const _zephyr_debug = (_a = process.env['DEBUG']) === null || _a === void 0 ? void 0 : _a.indexOf('zephyr');
|
|
8
|
+
exports.is_debug_enabled = typeof _zephyr_debug === 'number' && _zephyr_debug !== -1;
|
|
9
|
+
//# sourceMappingURL=debug-enabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-enabled.js","sourceRoot":"","sources":["../../../src/lib/utils/debug-enabled.ts"],"names":[],"mappings":";;;;;AAAA,8DAAwC;AAExC,MAAM,aAAa,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEjD,QAAA,gBAAgB,GAC3B,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
import { BuildErrorCode, DeployErrorCode, RuntimeErrorCode } from './error-types';
|
|
2
1
|
export declare const dimmedName: string;
|
|
3
2
|
export declare const brightBlueBgName: string;
|
|
4
3
|
export declare const brightYellowBgName: string;
|
|
5
4
|
export declare const brightRedBgName: string;
|
|
6
|
-
/** @description Custom error code sync with documentation on https://docs.zephyr-cloud.io */
|
|
7
|
-
type CodeType = BuildErrorCode | DeployErrorCode | RuntimeErrorCode;
|
|
8
|
-
declare class ZE_DEBUG {
|
|
9
|
-
constructor();
|
|
10
|
-
errorCodeFormatter(code: string): string;
|
|
11
|
-
success(msg: string): void;
|
|
12
|
-
log(msg: string): void;
|
|
13
|
-
/** first parameter being error code, if this error is unknown and not defined, pass in "" as empty string as first parameter and it will auto return "Unknown error".
|
|
14
|
-
* The code and error types located in [error-types.ts](./error-types.ts)
|
|
15
|
-
* @description If error code is passed in it will return pretty and formatted error.
|
|
16
|
-
* @example **Passing empty error code**
|
|
17
|
-
* ```
|
|
18
|
-
* ze_error("",
|
|
19
|
-
`[${options?.method || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str} \n Error: ${e}`
|
|
20
|
-
);
|
|
21
|
-
```
|
|
22
|
-
*/
|
|
23
|
-
error(code?: CodeType | unknown, msg?: string | boolean | void, ...arg: unknown[]): void;
|
|
24
|
-
}
|
|
25
|
-
export declare const is_debug_enabled: boolean;
|
|
26
5
|
export declare const ze_log: import("debug").Debugger;
|
|
27
|
-
export declare const ze_error:
|
|
28
|
-
|
|
29
|
-
|
|
6
|
+
export declare const ze_error: {
|
|
7
|
+
(...data: any[]): void;
|
|
8
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
9
|
+
};
|
package/dist/lib/utils/debug.js
CHANGED
|
@@ -1,66 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
|
|
3
|
+
exports.ze_error = exports.ze_log = exports.brightRedBgName = exports.brightYellowBgName = exports.brightBlueBgName = exports.dimmedName = void 0;
|
|
4
|
+
// light weight utils for decorated console.error + able to toggle different parts of whole module's logging result
|
|
6
5
|
const debug_1 = require("debug");
|
|
7
|
-
const process = tslib_1.__importStar(require("node:process"));
|
|
8
6
|
const picocolor_1 = require("./picocolor");
|
|
9
|
-
const
|
|
7
|
+
const debug_enabled_1 = require("./debug-enabled");
|
|
8
|
+
//TODO: this should be traced and logged into new relic
|
|
9
|
+
//TODO: print different colors to it + Capitalize maybe?
|
|
10
10
|
const name = ' ZEPHYR ';
|
|
11
|
-
const doc = 'For potential workaround, see documentation https://docs.zephyr-cloud.io/guide/error';
|
|
12
11
|
exports.dimmedName = (0, picocolor_1.dim)(name);
|
|
13
12
|
exports.brightBlueBgName = (0, picocolor_1.bold)((0, picocolor_1.bgCyanBright)((0, picocolor_1.black)(name)));
|
|
14
13
|
exports.brightYellowBgName = (0, picocolor_1.bold)((0, picocolor_1.bgYellowBright)((0, picocolor_1.black)(name)));
|
|
15
|
-
exports.brightRedBgName = (0, picocolor_1.bold)((0, picocolor_1.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
success(msg) {
|
|
24
|
-
const blueMessage = (0, picocolor_1.blue)(msg);
|
|
25
|
-
(0, debug_1.debug)(`\n${exports.brightBlueBgName} ${blueMessage}\n`);
|
|
26
|
-
}
|
|
27
|
-
log(msg) {
|
|
28
|
-
const yellowMessage = (0, picocolor_1.yellow)(msg);
|
|
29
|
-
(0, debug_1.debug)(`\n${exports.brightYellowBgName}:log ${yellowMessage} \n`);
|
|
30
|
-
}
|
|
31
|
-
/** first parameter being error code, if this error is unknown and not defined, pass in "" as empty string as first parameter and it will auto return "Unknown error".
|
|
32
|
-
* The code and error types located in [error-types.ts](./error-types.ts)
|
|
33
|
-
* @description If error code is passed in it will return pretty and formatted error.
|
|
34
|
-
* @example **Passing empty error code**
|
|
35
|
-
* ```
|
|
36
|
-
* ze_error("",
|
|
37
|
-
`[${options?.method || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str} \n Error: ${e}`
|
|
38
|
-
);
|
|
39
|
-
```
|
|
40
|
-
*/
|
|
41
|
-
error(code, msg, ...arg) {
|
|
42
|
-
const redMessage = typeof msg === "string" ? (0, picocolor_1.red)(msg) : "Unknown error" + msg;
|
|
43
|
-
const errorCode = this.errorCodeFormatter(code);
|
|
44
|
-
let details = redMessage;
|
|
45
|
-
if (typeof code === "string" && (code === null || code === void 0 ? void 0 : code.startsWith("BU"))) {
|
|
46
|
-
details = (0, picocolor_1.red)(error_types_1.errorMessages.buildErrorMessages[code]);
|
|
47
|
-
}
|
|
48
|
-
if (typeof code === "string" && (code === null || code === void 0 ? void 0 : code.startsWith("DE"))) {
|
|
49
|
-
details = (0, picocolor_1.red)(error_types_1.errorMessages.deployErrorMessages[code]);
|
|
50
|
-
}
|
|
51
|
-
if (typeof code === "string" && (code === null || code === void 0 ? void 0 : code.startsWith("RT"))) {
|
|
52
|
-
details = (0, picocolor_1.red)(error_types_1.errorMessages.runtimeErrorMessages[code]);
|
|
53
|
-
}
|
|
54
|
-
const documentation = code ? (0, picocolor_1.red)(`\n${doc}/${code.toString().toLowerCase()}`) : (0, picocolor_1.red)(`\n${doc}`);
|
|
55
|
-
exports.console.error.bind(`\n${exports.brightRedBgName} ${errorCode} ${details !== null && details !== void 0 ? details : redMessage} \n`, exports.console, ...arg, documentation);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const _zephyr_debug = (_a = process.env['DEBUG']) === null || _a === void 0 ? void 0 : _a.indexOf('zephyr');
|
|
59
|
-
exports.is_debug_enabled = typeof _zephyr_debug === 'number'
|
|
60
|
-
&& _zephyr_debug !== -1;
|
|
61
|
-
exports.ze_log = (0, debug_1.debug)(`${exports.brightBlueBgName}:log`);
|
|
62
|
-
exports.ze_error = exports.is_debug_enabled
|
|
63
|
-
? (0, debug_1.debug)(`${exports.brightRedBgName}:error`)
|
|
64
|
-
: new ZE_DEBUG().error;
|
|
65
|
-
exports.console = new ZE_DEBUG();
|
|
14
|
+
exports.brightRedBgName = (0, picocolor_1.bold)((0, picocolor_1.bgRedBright)((0, picocolor_1.black)(name)));
|
|
15
|
+
exports.ze_log = (0, debug_1.debug)('zephyr:log');
|
|
16
|
+
// If debug mode is not enabled just print whatever console output is
|
|
17
|
+
// If debug mode is enabled print the error from our end
|
|
18
|
+
exports.ze_error = debug_enabled_1.is_debug_enabled
|
|
19
|
+
? (0, debug_1.debug)('zephyr:error')
|
|
20
|
+
: console.error.bind(console);
|
|
66
21
|
//# sourceMappingURL=debug.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/lib/utils/debug.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/lib/utils/debug.ts"],"names":[],"mappings":";;;AAAA,mHAAmH;AACnH,iCAA8B;AAC9B,2CAOqB;AACrB,mDAAmD;AAEnD,uDAAuD;AACvD,wDAAwD;AACxD,MAAM,IAAI,GAAG,UAAU,CAAC;AAEX,QAAA,UAAU,GAAG,IAAA,eAAG,EAAC,IAAI,CAAC,CAAC;AAEvB,QAAA,gBAAgB,GAAG,IAAA,gBAAI,EAAC,IAAA,wBAAY,EAAC,IAAA,iBAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEnD,QAAA,kBAAkB,GAAG,IAAA,gBAAI,EAAC,IAAA,0BAAc,EAAC,IAAA,iBAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEvD,QAAA,eAAe,GAAG,IAAA,gBAAI,EAAC,IAAA,uBAAW,EAAC,IAAA,iBAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEjD,QAAA,MAAM,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC;AAC1C,qEAAqE;AACrE,wDAAwD;AAC3C,QAAA,QAAQ,GAAG,gCAAgB;IACtC,CAAC,CAAC,IAAA,aAAK,EAAC,cAAc,CAAC;IACvB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
export declare const docsPrefix = "https://docs.zephyr-cloud.io/guide/error";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Deploy = "DE",
|
|
7
|
-
/** "RT" is the prefix for errors happen in runtime - sometimes they are not related to us and the debugging, error handling might be living in other framework, bundler, github issues etc.
|
|
8
|
-
*
|
|
9
|
-
* keeping it here to attach 'issues not related to us but it'd be nice of us to send them the potential workaround in the terminal.
|
|
10
|
-
*
|
|
11
|
-
* For now we haven't seen enough of this error reporting back. Unless we have the statistics from user, otherwise our docs related to this part would be empty*/
|
|
12
|
-
Runtime = "RT"
|
|
13
|
-
}
|
|
14
|
-
export type BuildErrorCode = `${ErrorCategories.Build}100${number}`;
|
|
15
|
-
export type DeployErrorCode = `${ErrorCategories.Deploy}200${number}`;
|
|
16
|
-
export type RuntimeErrorCode = `${ErrorCategories.Runtime}300${number}`;
|
|
2
|
+
export type Prefix = 'ZE';
|
|
3
|
+
export type BuildErrorCode = `${Prefix}100${number}`;
|
|
4
|
+
export type DeployErrorCode = `${Prefix}200${number}`;
|
|
5
|
+
export type RuntimeErrorCode = `${Prefix}300${number}`;
|
|
17
6
|
type BuildErrorMessageType = {
|
|
18
7
|
[T in BuildErrorCode]: string;
|
|
19
8
|
};
|
|
@@ -2,68 +2,68 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.errorMessages = exports.runtimeErrorMessages = exports.deployErrorMessages = exports.buildErrorMessages = exports.docsPrefix = void 0;
|
|
4
4
|
// ! If anyone is adding new errors to this file please make sure the description and debugging for users are sync with documentation's error page
|
|
5
|
-
exports.docsPrefix =
|
|
5
|
+
exports.docsPrefix = 'https://docs.zephyr-cloud.io/guide/error';
|
|
6
6
|
/**
|
|
7
7
|
* A collection of error types and the error code during local/build stage*/
|
|
8
8
|
exports.buildErrorMessages = {
|
|
9
9
|
/** package.json not found error */
|
|
10
|
-
|
|
10
|
+
ZE10010: 'Package.json not found',
|
|
11
11
|
/** Package.json is not in a valid json format*/
|
|
12
|
-
|
|
12
|
+
ZE10011: 'Package.json is not in a valid json format.',
|
|
13
13
|
/** Webpack config error*/
|
|
14
|
-
|
|
14
|
+
ZE10012: 'Webpack config error.', // TODO: we don't detect this error yet, will we be able to separate them?
|
|
15
15
|
/** Package.json must have a name and version field. */
|
|
16
|
-
|
|
16
|
+
ZE10013: 'Package.json must have a name and version field.',
|
|
17
17
|
/** Git remote origin is not configured properly.*/
|
|
18
|
-
|
|
18
|
+
ZE10014: 'Git remote origin is not configured properly.',
|
|
19
19
|
/** Git username or email is not configured. */
|
|
20
|
-
|
|
20
|
+
ZE10015: 'Git username or email is not configured.',
|
|
21
21
|
/** Could not get git info */
|
|
22
|
-
|
|
22
|
+
ZE10016: 'Could not get git info.',
|
|
23
23
|
/** application_uid missing. */
|
|
24
|
-
|
|
24
|
+
ZE10017: '`application_uid` missing.',
|
|
25
25
|
/** Auth error */
|
|
26
|
-
|
|
26
|
+
ZE10018: 'Auth error.',
|
|
27
27
|
/** Could not get build id. */
|
|
28
|
-
|
|
28
|
+
ZE10019: 'Could not get build id.',
|
|
29
29
|
/**Could not initialize Zephyr Agent. */
|
|
30
|
-
|
|
30
|
+
ZE10020: 'Could not initialize Zephyr Agent.',
|
|
31
31
|
/**Failed to get application hash list. */
|
|
32
|
-
|
|
32
|
+
ZE10021: 'Failed to get application hash list.',
|
|
33
33
|
};
|
|
34
34
|
/** Happens when users are able to "deploy" -> there'd be edge url show up in their terminal. but when they click on that link it will show them this error. */
|
|
35
35
|
exports.deployErrorMessages = {
|
|
36
36
|
/** Assets not found. */
|
|
37
|
-
|
|
37
|
+
ZE20010: 'Assets not found.',
|
|
38
38
|
/** Assets not found in snapshot. */
|
|
39
|
-
|
|
39
|
+
ZE20011: 'Assets not found in snapshot.',
|
|
40
40
|
/** `application_uid` is required. */
|
|
41
|
-
|
|
41
|
+
ZE20012: '`application_uid` is required.',
|
|
42
42
|
/** Missing file hash */
|
|
43
|
-
|
|
43
|
+
ZE20013: 'Missing file hash.',
|
|
44
44
|
/** Failed to load application configuration. */
|
|
45
|
-
|
|
45
|
+
ZE20014: 'Failed to load application configuration.',
|
|
46
46
|
/**Failed to upload build stats. */
|
|
47
|
-
|
|
47
|
+
ZE20015: 'Failed to upload build stats.',
|
|
48
48
|
/** Did not receive envs from build stats upload */
|
|
49
|
-
|
|
49
|
+
ZE20016: 'Did not receive envs from build stats upload.',
|
|
50
50
|
/** Failed to upload assets. */
|
|
51
|
-
|
|
51
|
+
ZE20017: 'Failed to upload assets.',
|
|
52
52
|
/** Failed to upload snapshots. */
|
|
53
|
-
|
|
53
|
+
ZE20018: 'Failed to upload snapshots.',
|
|
54
54
|
/** Snapshot uploads gave no results. */
|
|
55
|
-
|
|
55
|
+
ZE20019: 'Snapshot uploads gave no results.',
|
|
56
56
|
/**Failed to get application hash list */
|
|
57
|
-
|
|
57
|
+
ZE20020: 'Failed to get application hash list.',
|
|
58
58
|
/** Could not resolve ${name} with verson ${version} */
|
|
59
|
-
|
|
59
|
+
ZE20021: 'Could not resolve application name with version.',
|
|
60
60
|
/** Could not get build id */
|
|
61
|
-
|
|
61
|
+
ZE20022: 'Could not get build id.',
|
|
62
62
|
};
|
|
63
63
|
exports.runtimeErrorMessages = {};
|
|
64
64
|
exports.errorMessages = {
|
|
65
65
|
buildErrorMessages: exports.buildErrorMessages,
|
|
66
66
|
deployErrorMessages: exports.deployErrorMessages,
|
|
67
|
-
runtimeErrorMessages: exports.runtimeErrorMessages
|
|
67
|
+
runtimeErrorMessages: exports.runtimeErrorMessages,
|
|
68
68
|
};
|
|
69
69
|
//# sourceMappingURL=error-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-types.js","sourceRoot":"","sources":["../../../src/lib/utils/error-types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"error-types.js","sour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IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAMW,QAAA,oBAAoB,GAA4B,EAAE,CAAC;AAQnD,QAAA,aAAa,GAAoB;IAC5C,kBAAkB,EAAlB,0BAAkB;IAClB,mBAAmB,EAAnB,2BAAmB;IACnB,oBAAoB,EAApB,4BAAoB;CACrB,CAAC"}
|
|
@@ -16,12 +16,14 @@ exports.bgWhiteBright = exports.bgCyanBright = exports.bgMagentaBright = exports
|
|
|
16
16
|
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
17
17
|
//
|
|
18
18
|
// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
|
|
19
|
+
const debug_enabled_1 = require("./debug-enabled");
|
|
19
20
|
const { env, stdout } = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.process) !== null && _a !== void 0 ? _a : {};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const enabled = !debug_enabled_1.is_debug_enabled &&
|
|
22
|
+
env &&
|
|
23
|
+
!env['NO_COLOR'] &&
|
|
24
|
+
(env['FORCE_COLOR'] ||
|
|
25
|
+
((stdout === null || stdout === void 0 ? void 0 : stdout.isTTY) && !env['CI'] && env['TERM'] !== 'dumb'));
|
|
26
|
+
// const enabled = env
|
|
25
27
|
const replaceClose = (str, close, replace, index) => {
|
|
26
28
|
const start = str.substring(0, index) + replace;
|
|
27
29
|
const end = str.substring(index + close.length);
|
|
@@ -71,21 +73,21 @@ exports.bgMagenta = formatter('\x1b[45m', '\x1b[49m');
|
|
|
71
73
|
exports.bgCyan = formatter('\x1b[46m', '\x1b[49m');
|
|
72
74
|
exports.bgWhite = formatter('\x1b[47m', '\x1b[49m');
|
|
73
75
|
// special text colors
|
|
74
|
-
exports.blackBright = formatter(
|
|
75
|
-
exports.redBright = formatter(
|
|
76
|
-
exports.greenBright = formatter(
|
|
77
|
-
exports.yellowBright = formatter(
|
|
78
|
-
exports.blueBright = formatter(
|
|
79
|
-
exports.magentaBright = formatter(
|
|
80
|
-
exports.cyanBright = formatter(
|
|
81
|
-
exports.whiteBright = formatter(
|
|
76
|
+
exports.blackBright = formatter('\x1b[90m', '\x1b[39m');
|
|
77
|
+
exports.redBright = formatter('\x1b[91m', '\x1b[39m');
|
|
78
|
+
exports.greenBright = formatter('\x1b[92m', '\x1b[39m');
|
|
79
|
+
exports.yellowBright = formatter('\x1b[93m', '\x1b[39m');
|
|
80
|
+
exports.blueBright = formatter('\x1b[94m', '\x1b[39m');
|
|
81
|
+
exports.magentaBright = formatter('\x1b[95m', '\x1b[39m');
|
|
82
|
+
exports.cyanBright = formatter('\x1b[96m', '\x1b[39m');
|
|
83
|
+
exports.whiteBright = formatter('\x1b[97m', '\x1b[39m');
|
|
82
84
|
// special background colors
|
|
83
|
-
exports.bgBlackBright = formatter(
|
|
84
|
-
exports.bgRedBright = formatter(
|
|
85
|
-
exports.bgGreenBright = formatter(
|
|
86
|
-
exports.bgYellowBright = formatter(
|
|
87
|
-
exports.bgBlueBright = formatter(
|
|
88
|
-
exports.bgMagentaBright = formatter(
|
|
89
|
-
exports.bgCyanBright = formatter(
|
|
90
|
-
exports.bgWhiteBright = formatter(
|
|
85
|
+
exports.bgBlackBright = formatter('\x1b[100m', '\x1b[49m');
|
|
86
|
+
exports.bgRedBright = formatter('\x1b[101m', '\x1b[49m');
|
|
87
|
+
exports.bgGreenBright = formatter('\x1b[102m', '\x1b[49m');
|
|
88
|
+
exports.bgYellowBright = formatter('\x1b[103m', '\x1b[49m');
|
|
89
|
+
exports.bgBlueBright = formatter('\x1b[104m', '\x1b[49m');
|
|
90
|
+
exports.bgMagentaBright = formatter('\x1b[105m', '\x1b[49m');
|
|
91
|
+
exports.bgCyanBright = formatter('\x1b[106m', '\x1b[49m');
|
|
92
|
+
exports.bgWhiteBright = formatter('\x1b[107m', '\x1b[49m');
|
|
91
93
|
//# sourceMappingURL=picocolor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picocolor.js","sourceRoot":"","sources":["../../../src/lib/utils/picocolor.ts"],"names":[],"mappings":";AAAA,cAAc;;;;AAEd,wEAAwE;AAExE,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AAEpE,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,iEAAiE;AACjE,EAAE;AACF,8GAA8G;AAE9G,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,mCAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"picocolor.js","sourceRoot":"","sources":["../../../src/lib/utils/picocolor.ts"],"names":[],"mappings":";AAAA,cAAc;;;;AAEd,wEAAwE;AAExE,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AAEpE,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,iEAAiE;AACjE,EAAE;AACF,8GAA8G;AAE9G,mDAAmD;AAEnD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,mCAAI,EAAE,CAAC;AAElD,MAAM,OAAO,GACX,CAAC,gCAAgB;IACjB,GAAG;IACH,CAAC,GAAG,CAAC,UAAU,CAAC;IAChB,CAAC,GAAG,CAAC,aAAa,CAAC;QACjB,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,KAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;AAE7D,sBAAsB;AAEtB,MAAM,YAAY,GAAG,CACnB,GAAW,EACX,KAAa,EACb,OAAe,EACf,KAAa,EACL,EAAE;I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U,CAAC,CAAC;AAClD,QAAA,eAAe,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AACrD,QAAA,YAAY,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAClD,QAAA,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -25,7 +25,7 @@ function request(url, options, data) {
|
|
|
25
25
|
const req = _https.request(url, options !== null && options !== void 0 ? options : {}, (res) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
if (res.statusCode === 401 || res.statusCode === 403) {
|
|
27
27
|
yield (0, token_1.cleanTokens)();
|
|
28
|
-
const err = new Error(`${debug_2.brightRedBgName} ${(0, picocolor_1.red)(`Error [
|
|
28
|
+
const err = new Error(`${debug_2.brightRedBgName} ${(0, picocolor_1.red)(`Error [ZE10018]: auth error, please sign in to https://app.zephyr-cloud.io then try to build again. See documentation https://docs.zephyr-cloud.io/guide/error/bu10018`)}`);
|
|
29
29
|
err.stack = void 0;
|
|
30
30
|
throw err;
|
|
31
31
|
}
|
|
@@ -54,7 +54,7 @@ function request(url, options, data) {
|
|
|
54
54
|
});
|
|
55
55
|
}));
|
|
56
56
|
req.on('error', (e) => {
|
|
57
|
-
(0, debug_1.ze_error)(
|
|
57
|
+
(0, debug_1.ze_error)('', `[${(options === null || options === void 0 ? void 0 : options.method) || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str} \n ${e}`);
|
|
58
58
|
reject(e);
|
|
59
59
|
});
|
|
60
60
|
if (data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ze-http-request.js","sourceRoot":"","sources":["../../../src/lib/utils/ze-http-request.ts"],"names":[],"mappings":";;;;AACA,wDAAkC;AAClC,0DAAoC;AACpC,mCAA2C;AAC3C,iDAAoD;AACpD,uDAAoD;AACpD,mCAA0C;AAC1C,2CAAkC;AAElC,SAAS,OAAO,CAAC,GAAuB;IACtC,IA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;AAzED,0BAyEC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export interface ZephyrBuildStats {
|
|
2
|
+
project: string;
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
environment: string;
|
|
7
|
+
posted?: Date;
|
|
8
|
+
remote: string | undefined;
|
|
9
|
+
metadata: unknown;
|
|
10
|
+
overrides: ApplicationOverride[];
|
|
11
|
+
consumes: ApplicationConsumes[];
|
|
12
|
+
modules: ApplicationModule[];
|
|
13
|
+
tags: string[];
|
|
14
|
+
dependencies?: RawDependency[];
|
|
15
|
+
optionalDependencies?: RawDependency[];
|
|
16
|
+
peerDependencies?: RawDependency[];
|
|
17
|
+
devDependencies?: RawDependency[];
|
|
18
|
+
default?: boolean;
|
|
19
|
+
remotes?: string[];
|
|
20
|
+
app: {
|
|
21
|
+
name: string;
|
|
22
|
+
version: string;
|
|
23
|
+
org: string;
|
|
24
|
+
project: string;
|
|
25
|
+
buildId: number;
|
|
26
|
+
};
|
|
27
|
+
git: {
|
|
28
|
+
name: string;
|
|
29
|
+
email: string;
|
|
30
|
+
branch: string;
|
|
31
|
+
commit: string;
|
|
32
|
+
};
|
|
33
|
+
context: {
|
|
34
|
+
username: string;
|
|
35
|
+
isCI: boolean;
|
|
36
|
+
};
|
|
37
|
+
edge: {
|
|
38
|
+
url: string;
|
|
39
|
+
versionUrl?: string;
|
|
40
|
+
};
|
|
41
|
+
domain?: string | undefined;
|
|
42
|
+
platform?: DeploymentIntegrationPlatform | undefined;
|
|
43
|
+
type: unknown;
|
|
44
|
+
}
|
|
45
|
+
declare enum DeploymentIntegrationPlatform {
|
|
46
|
+
CLOUDFLARE = "cloudflare",
|
|
47
|
+
AWS = "aws",
|
|
48
|
+
NETLIFY = "netlify",
|
|
49
|
+
AZURE = "azure",
|
|
50
|
+
GCP = "gcp"
|
|
51
|
+
}
|
|
52
|
+
export interface RawDependency {
|
|
53
|
+
name: string;
|
|
54
|
+
version: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ApplicationModule {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
applicationID: string;
|
|
60
|
+
requires: string[];
|
|
61
|
+
file: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ApplicationOverride {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
version: string;
|
|
67
|
+
location: string;
|
|
68
|
+
applicationID: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ApplicationConsumes {
|
|
71
|
+
consumingApplicationID: string;
|
|
72
|
+
applicationID: string;
|
|
73
|
+
name: string;
|
|
74
|
+
usedIn: UsedIn[];
|
|
75
|
+
}
|
|
76
|
+
export interface UsedIn {
|
|
77
|
+
file: string;
|
|
78
|
+
url: string;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var DeploymentIntegrationPlatform;
|
|
4
|
+
(function (DeploymentIntegrationPlatform) {
|
|
5
|
+
DeploymentIntegrationPlatform["CLOUDFLARE"] = "cloudflare";
|
|
6
|
+
DeploymentIntegrationPlatform["AWS"] = "aws";
|
|
7
|
+
DeploymentIntegrationPlatform["NETLIFY"] = "netlify";
|
|
8
|
+
DeploymentIntegrationPlatform["AZURE"] = "azure";
|
|
9
|
+
DeploymentIntegrationPlatform["GCP"] = "gcp";
|
|
10
|
+
})(DeploymentIntegrationPlatform || (DeploymentIntegrationPlatform = {}));
|
|
11
|
+
//# sourceMappingURL=zephyr-build-stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zephyr-build-stats.js","sourceRoot":"","sources":["../../src/lib/zephyr-build-stats.ts"],"names":[],"mappings":";;AAgDA,IAAK,6BAMJ;AAND,WAAK,6BAA6B;IAChC,0DAAyB,CAAA;IACzB,4CAAW,CAAA;IACX,oDAAmB,CAAA;IACnB,gDAAe,CAAA;IACf,4CAAW,CAAA;AACb,CAAC,EANI,6BAA6B,KAA7B,6BAA6B,QAMjC"}
|
package/dist/package.json
CHANGED