zephyr-edge-contract 0.0.13 → 0.0.14

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 CHANGED
@@ -2,19 +2,22 @@ export { createApplicationUID } from './lib/utils/create-application-u-i-d';
2
2
  export { createSnapshotId } from './lib/utils/create-snapshot-id';
3
3
  export { ZeAppVersion, ZeAppVersionResponse } from './lib/ze-api/app-version';
4
4
  export { ZeApplicationList } from './lib/ze-api/app-list';
5
- export { Snapshot, SnapshotAsset } from './lib/snapshot';
5
+ export { Snapshot, SnapshotAsset, SnapshotMetadata } from './lib/snapshot';
6
6
  export { ZeEnvs, ZeUploadBuildStats } from './lib/edge-api/ze-envs-request';
7
7
  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
- export { ZeApplicationConfig, getAppConfig, remoteAppConfig, saveAppConfig, } from './lib/node-persist/application-configuration';
10
+ export { ZeApplicationConfig, NetlifyIntegrationConfig, getAppConfig, remoteAppConfig, saveAppConfig, } from './lib/node-persist/application-configuration';
11
11
  export { getPartialAssetMap, removePartialAssetMap, savePartialAssetMap, } from './lib/node-persist/partial-assets-map';
12
12
  export { getSecretToken } from './lib/node-persist/secret-token';
13
13
  export { saveToken, getToken, removeToken, cleanTokens, } from './lib/node-persist/token';
14
14
  export { ZephyrPluginOptions } from './lib/plugin-options/zephyr-plugin-options';
15
15
  export { ZEPHYR_API_ENDPOINT, v2_api_paths, } from './lib/api-contract-negotiation/get-api-contract';
16
- export { ze_log, ze_error, is_debug_enabled } from './lib/utils/debug';
16
+ export * as color from "./lib/utils/picocolor";
17
+ export { ze_log, ze_error, is_debug_enabled, brightBlueBgName, brightRedBgName, brightYellowBgName, dimmedName } from './lib/utils/debug';
17
18
  export { safe_json_parse } from './lib/utils/safe-json-parse';
18
19
  export { request } from './lib/utils/ze-http-request';
20
+ export * as colors from "./lib/utils/picocolor";
19
21
  export { LocalPackageJson } from './lib/ze-api/local-package-json';
20
22
  export { ConvertedGraph } from './lib/ze-api/converted-graph';
23
+ export * from './lib/node-persist/upload-provider-options';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.request = exports.safe_json_parse = exports.is_debug_enabled = exports.ze_error = exports.ze_log = exports.v2_api_paths = 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;
3
+ exports.colors = exports.request = exports.safe_json_parse = exports.dimmedName = exports.brightYellowBgName = exports.brightRedBgName = exports.brightBlueBgName = exports.is_debug_enabled = exports.ze_error = exports.ze_log = exports.color = exports.v2_api_paths = 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; } });
@@ -27,12 +27,19 @@ Object.defineProperty(exports, "cleanTokens", { enumerable: true, get: function
27
27
  var get_api_contract_1 = require("./lib/api-contract-negotiation/get-api-contract");
28
28
  Object.defineProperty(exports, "ZEPHYR_API_ENDPOINT", { enumerable: true, get: function () { return get_api_contract_1.ZEPHYR_API_ENDPOINT; } });
29
29
  Object.defineProperty(exports, "v2_api_paths", { enumerable: true, get: function () { return get_api_contract_1.v2_api_paths; } });
30
+ exports.color = tslib_1.__importStar(require("./lib/utils/picocolor"));
30
31
  var debug_1 = require("./lib/utils/debug");
31
32
  Object.defineProperty(exports, "ze_log", { enumerable: true, get: function () { return debug_1.ze_log; } });
32
33
  Object.defineProperty(exports, "ze_error", { enumerable: true, get: function () { return debug_1.ze_error; } });
33
34
  Object.defineProperty(exports, "is_debug_enabled", { enumerable: true, get: function () { return debug_1.is_debug_enabled; } });
35
+ Object.defineProperty(exports, "brightBlueBgName", { enumerable: true, get: function () { return debug_1.brightBlueBgName; } });
36
+ Object.defineProperty(exports, "brightRedBgName", { enumerable: true, get: function () { return debug_1.brightRedBgName; } });
37
+ Object.defineProperty(exports, "brightYellowBgName", { enumerable: true, get: function () { return debug_1.brightYellowBgName; } });
38
+ Object.defineProperty(exports, "dimmedName", { enumerable: true, get: function () { return debug_1.dimmedName; } });
34
39
  var safe_json_parse_1 = require("./lib/utils/safe-json-parse");
35
40
  Object.defineProperty(exports, "safe_json_parse", { enumerable: true, get: function () { return safe_json_parse_1.safe_json_parse; } });
36
41
  var ze_http_request_1 = require("./lib/utils/ze-http-request");
37
42
  Object.defineProperty(exports, "request", { enumerable: true, get: function () { return ze_http_request_1.request; } });
43
+ exports.colors = tslib_1.__importStar(require("./lib/utils/picocolor"));
44
+ tslib_1.__exportStar(require("./lib/node-persist/upload-provider-options"), exports);
38
45
  //# 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;AAEzD,0FAKsD;AAHpD,yHAAA,YAAY,OAAA;AACZ,4HAAA,eAAe,OAAA;AACf,0HAAA,aAAa,OAAA;AAGf,4E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AA,gBAAgB,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAAE,mGAAA,UAAU,OAAA;AAC9G,+DAA8D;AAArD,kHAAA,eAAe,OAAA;AACxB,+DAAsD;AAA7C,0GAAA,OAAO,OAAA;AAChB,wEAA+C;AAI/C,qFAA2D"}
@@ -1,3 +1,8 @@
1
+ import { UploadProviderConfig } from './upload-provider-options';
2
+ export interface NetlifyIntegrationConfig {
3
+ api_token: string;
4
+ site_id: string;
5
+ }
1
6
  export interface ZeApplicationConfig {
2
7
  user_uuid: string;
3
8
  username: string;
@@ -6,7 +11,15 @@ export interface ZeApplicationConfig {
6
11
  AUTH0_DOMAIN: string;
7
12
  BUILD_ID_ENDPOINT: string;
8
13
  EDGE_URL: string;
14
+ DOMAIN?: string;
15
+ INTEGRATION_CONFIG?: NetlifyIntegrationConfig & {
16
+ type?: 'worker' | 'pages';
17
+ };
18
+ PLATFORM: 'cloudflare' | 'netlify';
9
19
  jwt: string;
20
+ uploadConfig: UploadProviderConfig;
21
+ application_uid: string;
22
+ fetched_at?: number;
10
23
  }
11
24
  export declare function saveAppConfig(application_uid: string, json: ZeApplicationConfig): Promise<void>;
12
25
  export declare function getAppConfig(application_uid: string): Promise<ZeApplicationConfig | undefined>;
@@ -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;AACjC,iDAAsD;AAatD,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,CACjC,eAAuB,EACvB,IAAyB;;QAEzB,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;CAAA;AAND,sCAMC;AAED,SAAsB,YAAY,CAChC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3C,CAAC;CAAA;AALD,oCAKC;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
+ {"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,CACjC,eAAuB,EACvB,IAAyB;;QAEzB,MAAM,OAAO,CAAC;QACd,KAAK,CAAC,MAAM,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;CAAA;AAND,sCAMC;AAED,SAAsB,YAAY,CAChC,eAAuB;;QAEvB,MAAM,OAAO,CAAC;QACd,OAAO,IAAA,sBAAO,EAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3C,CAAC;CAAA;AALD,oCAKC;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"}
@@ -0,0 +1,18 @@
1
+ export interface UploadProviderConfig {
2
+ type: UploadProviderType;
3
+ providerConfig: IntegrationConfig;
4
+ }
5
+ export declare enum UploadProviderType {
6
+ CLOUDFLARE = "cloudflare",
7
+ AWS = "aws",
8
+ NETLIFY = "netlify",
9
+ AZURE = "azure",
10
+ GCP = "gcp"
11
+ }
12
+ export interface CloudflareOptions {
13
+ edgeUrl: string;
14
+ api_token: string;
15
+ accountId: string;
16
+ projectName?: string;
17
+ }
18
+ export type IntegrationConfig = CloudflareOptions;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UploadProviderType = void 0;
4
+ var UploadProviderType;
5
+ (function (UploadProviderType) {
6
+ UploadProviderType["CLOUDFLARE"] = "cloudflare";
7
+ UploadProviderType["AWS"] = "aws";
8
+ UploadProviderType["NETLIFY"] = "netlify";
9
+ UploadProviderType["AZURE"] = "azure";
10
+ UploadProviderType["GCP"] = "gcp";
11
+ })(UploadProviderType || (exports.UploadProviderType = UploadProviderType = {}));
12
+ //# sourceMappingURL=upload-provider-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-provider-options.js","sourceRoot":"","sources":["../../../src/lib/node-persist/upload-provider-options.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,+CAAyB,CAAA;IACzB,iCAAW,CAAA;IACX,yCAAmB,CAAA;IACnB,qCAAe,CAAA;IACf,iCAAW,CAAA;AACb,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B"}
@@ -29,4 +29,5 @@ export interface ZephyrPluginOptions {
29
29
  shared?: Record<string, unknown>;
30
30
  };
31
31
  wait_for_index_html?: boolean;
32
+ outputPath?: string;
32
33
  }
@@ -35,3 +35,6 @@ export interface SnapshotAsset {
35
35
  hash: string;
36
36
  size: number;
37
37
  }
38
+ export interface SnapshotMetadata {
39
+ pages_url?: string;
40
+ }
@@ -1,6 +1,29 @@
1
+ import { BuildErrorCode, DeployErrorCode, RuntimeErrorCode } from './error-types';
2
+ export declare const dimmedName: string;
3
+ export declare const brightBlueBgName: string;
4
+ export declare const brightYellowBgName: string;
5
+ 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
+ }
1
25
  export declare const is_debug_enabled: boolean;
2
26
  export declare const ze_log: import("debug").Debugger;
3
- export declare const ze_error: {
4
- (...data: any[]): void;
5
- (message?: any, ...optionalParams: any[]): void;
6
- };
27
+ export declare const ze_error: (code?: CodeType | unknown, msg?: string | boolean | void | undefined, ...arg: unknown[]) => void;
28
+ export declare const console: ZE_DEBUG;
29
+ export {};
@@ -1,16 +1,66 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ze_error = exports.ze_log = exports.is_debug_enabled = void 0;
4
+ exports.console = exports.ze_error = exports.ze_log = exports.is_debug_enabled = exports.brightRedBgName = exports.brightYellowBgName = exports.brightBlueBgName = exports.dimmedName = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const debug_1 = require("debug");
7
7
  const process = tslib_1.__importStar(require("node:process"));
8
- const name = 'zephyr';
8
+ const picocolor_1 = require("./picocolor");
9
+ const error_types_1 = require("./error-types");
10
+ const name = ' ZEPHYR ';
11
+ const doc = 'For potential workaround, see documentation https://docs.zephyr-cloud.io/guide/error';
12
+ exports.dimmedName = (0, picocolor_1.dim)(name);
13
+ exports.brightBlueBgName = (0, picocolor_1.bold)((0, picocolor_1.bgCyanBright)((0, picocolor_1.black)(name)));
14
+ 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.bgYellowBright)((0, picocolor_1.black)(name)));
16
+ class ZE_DEBUG {
17
+ constructor() {
18
+ this.error = this.error.bind(this);
19
+ }
20
+ errorCodeFormatter(code) {
21
+ return (0, picocolor_1.red)(`Error code: [${code}]`);
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
+ }
9
58
  const _zephyr_debug = (_a = process.env['DEBUG']) === null || _a === void 0 ? void 0 : _a.indexOf('zephyr');
10
59
  exports.is_debug_enabled = typeof _zephyr_debug === 'number'
11
60
  && _zephyr_debug !== -1;
12
- exports.ze_log = (0, debug_1.debug)(`${name}:log`);
61
+ exports.ze_log = (0, debug_1.debug)(`${exports.brightBlueBgName}:log`);
13
62
  exports.ze_error = exports.is_debug_enabled
14
- ? (0, debug_1.debug)(`${name}:error`)
15
- : console.error.bind(console);
63
+ ? (0, debug_1.debug)(`${exports.brightRedBgName}:error`)
64
+ : new ZE_DEBUG().error;
65
+ exports.console = new ZE_DEBUG();
16
66
  //# sourceMappingURL=debug.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/lib/utils/debug.ts"],"names":[],"mappings":";;;;;AAAA,iCAA8B;AAC9B,8DAAwC;AAExC,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,aAAa,GAAG,MAAA,OAAO,CAAC,GAAG,CA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OAAO,GAAG,IAAA,eAAG,EAAC,2BAAa,CAAC,oBAAoB,CAAC,IAAwB,CAAC,CAAC,CAAA;QAC7E,CAAC;QAED,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,CAAC,IAAA,eAAG,EAAC,KAAK,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAA,eAAG,EAAC,KAAK,GAAG,EAAE,CAAC,CAAA;QAE/F,eAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,uBAAe,IAAI,SAAS,IAAI,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,UAAU,KAAK,EAAE,eAAO,EAAE,GAAG,GAAG,EAAE,aAAa,CAAC,CAAA;IACrH,CAAC;CACF;AAED,MAAM,aAAa,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,0CAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjD,QAAA,gBAAgB,GAAG,OAAO,aAAa,KAAK,QAAQ;OAC5D,aAAa,KAAK,CAAC,CAAC,CAAC;AAEb,QAAA,MAAM,GAAG,IAAA,aAAK,EAAC,GAAG,wBAAgB,MAAM,CAAC,CAAC;AAG1C,QAAA,QAAQ,GAAG,wBAAgB;IACtC,CAAC,CAAC,IAAA,aAAK,EAAC,GAAG,uBAAe,QAAQ,CAAC;IACnC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC,KAAK,CAAA;AAGX,QAAA,OAAO,GAAG,IAAI,QAAQ,EAAE,CAAA"}
@@ -0,0 +1,38 @@
1
+ export declare const docsPrefix = "https://docs.zephyr-cloud.io/guide/error";
2
+ export declare enum ErrorCategories {
3
+ /** "BU" is the prefix for errors happen during local development. This list will grow as we go. */
4
+ Build = "BU",
5
+ /** "DE" is the prefix for errors happen during deployment. */
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}`;
17
+ type BuildErrorMessageType = {
18
+ [T in BuildErrorCode]: string;
19
+ };
20
+ /**
21
+ * A collection of error types and the error code during local/build stage*/
22
+ export declare const buildErrorMessages: BuildErrorMessageType;
23
+ export type DeployErrorMessageType = {
24
+ [T in DeployErrorCode]: string;
25
+ };
26
+ /** 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. */
27
+ export declare const deployErrorMessages: DeployErrorMessageType;
28
+ export type RuntimeErrorMessageType = {
29
+ [T in RuntimeErrorCode]: string;
30
+ };
31
+ export declare const runtimeErrorMessages: RuntimeErrorMessageType;
32
+ export type ErrorMessageMap = {
33
+ buildErrorMessages: BuildErrorMessageType;
34
+ deployErrorMessages: DeployErrorMessageType;
35
+ runtimeErrorMessages: RuntimeErrorMessageType;
36
+ };
37
+ export declare const errorMessages: ErrorMessageMap;
38
+ export {};
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.errorMessages = exports.runtimeErrorMessages = exports.deployErrorMessages = exports.buildErrorMessages = exports.docsPrefix = void 0;
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 = "https://docs.zephyr-cloud.io/guide/error";
6
+ /**
7
+ * A collection of error types and the error code during local/build stage*/
8
+ exports.buildErrorMessages = {
9
+ /** package.json not found error */
10
+ BU10010: "Package.json not found",
11
+ /** Package.json is not in a valid json format*/
12
+ BU10011: "Package.json is not in a valid json format.",
13
+ /** Webpack config error*/
14
+ BU10012: "Webpack config error.", // TODO: we don't detect this error yet, will we be able to separate them?
15
+ /** Package.json must have a name and version field. */
16
+ BU10013: "Package.json must have a name and version field.",
17
+ /** Git remote origin is not configured properly.*/
18
+ BU10014: "Git remote origin is not configured properly.",
19
+ /** Git username or email is not configured. */
20
+ BU10015: "Git username or email is not configured.",
21
+ /** Could not get git info */
22
+ BU10016: "Could not get git info.",
23
+ /** application_uid missing. */
24
+ BU10017: "`application_uid` missing.",
25
+ /** Auth error */
26
+ BU10018: "Auth error.",
27
+ /** Could not get build id. */
28
+ BU10019: "Could not get build id.",
29
+ /**Could not initialize Zephyr Agent. */
30
+ BU10020: "Could not initialize Zephyr Agent.",
31
+ /**Failed to get application hash list. */
32
+ BU10021: "Failed to get application hash list.",
33
+ };
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
+ exports.deployErrorMessages = {
36
+ /** Assets not found. */
37
+ DE20010: "Assets not found.",
38
+ /** Assets not found in snapshot. */
39
+ DE20011: "Assets not found in snapshot.",
40
+ /** `application_uid` is required. */
41
+ DE20012: "`application_uid` is required.",
42
+ /** Missing file hash */
43
+ DE20013: "Missing file hash.",
44
+ /** Failed to load application configuration. */
45
+ DE20014: "Failed to load application configuration.",
46
+ /**Failed to upload build stats. */
47
+ DE20015: "Failed to upload build stats.",
48
+ /** Did not receive envs from build stats upload */
49
+ DE20016: "Did not receive envs from build stats upload.",
50
+ /** Failed to upload assets. */
51
+ DE20017: "Failed to upload assets.",
52
+ /** Failed to upload snapshots. */
53
+ DE20018: "Failed to upload snapshots.",
54
+ /** Snapshot uploads gave no results. */
55
+ DE20019: "Snapshot uploads gave no results.",
56
+ /**Failed to get application hash list */
57
+ DE20020: "Failed to get application hash list.",
58
+ /** Could not resolve ${name} with verson ${version} */
59
+ DE20021: "Could not resolve application name with version.",
60
+ /** Could not get build id */
61
+ DE20022: "Could not get build id."
62
+ };
63
+ exports.runtimeErrorMessages = {};
64
+ exports.errorMessages = {
65
+ buildErrorMessages: exports.buildErrorMessages,
66
+ deployErrorMessages: exports.deployErrorMessages,
67
+ runtimeErrorMessages: exports.runtimeErrorMessages
68
+ };
69
+ //# sourceMappingURL=error-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-types.js","sourceRoot":"","sources":["../../../src/lib/utils/error-types.ts"],"names":[],"mappings":";;;AACA,kJAAkJ;AACrI,QAAA,UAAU,GAAG,0CAA0C,CAAA;AAyBpE;4EAC4E;AAC/D,QAAA,kBAAkB,GAA0B;IACvD,mCAAmC;IACnC,OAAO,EAAE,wBAAwB;IACjC,gDAAgD;IAChD,OAAO,EAAE,6CAA6C;IACtD,0BAA0B;IAC1B,OAAO,EAAE,uBAAuB,EAAE,0EAA0E;IAC5G,uDAAuD;IACvD,OAAO,EAAE,kDAAkD;IAC3D,mDAAmD;IACnD,OAAO,EAAE,+CAA+C;IACxD,+CAA+C;IAC/C,OAAO,EAAE,0CAA0C;IACnD,6BAA6B;IAC7B,OAAO,EAAE,yBAAyB;IAClC,+BAA+B;IAC/B,OAAO,EAAE,4BAA4B;IACrC,iBAAiB;IACjB,OAAO,EAAE,aAAa;IACtB,8BAA8B;IAC9B,OAAO,EAAE,yBAAyB;IAClC,wCAAwC;IACxC,OAAO,EAAE,oCAAoC;IAC7C,0CAA0C;IAC1C,OAAO,EAAE,sCAAsC;CAGhD,CAAA;AAOD,+JAA+J;AAClJ,QAAA,mBAAmB,GAA2B;IACzD,wBAAwB;IACxB,OAAO,EAAE,mBAAmB;IAC5B,oCAAoC;IACpC,OAAO,EAAE,+BAA+B;IACxC,qCAAqC;IACrC,OAAO,EAAE,gCAAgC;IACzC,wBAAwB;IACxB,OAAO,EAAE,oBAAoB;IAC7B,gDAAgD;IAChD,OAAO,EAAE,2CAA2C;IACpD,mCAAmC;IACnC,OAAO,EAAE,+BAA+B;IACxC,mDAAmD;IACnD,OAAO,EAAE,+CAA+C;IACxD,+BAA+B;IAC/B,OAAO,EAAE,0BAA0B;IACnC,kCAAkC;IAClC,OAAO,EAAE,6BAA6B;IACtC,wCAAwC;IACxC,OAAO,EAAE,mCAAmC;IAC5C,yCAAyC;IACzC,OAAO,EAAE,sCAAsC;IAC/C,uDAAuD;IACvD,OAAO,EAAE,kDAAkD;IAC3D,6BAA6B;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAA;AAQY,QAAA,oBAAoB,GAA4B,EAE5D,CAAA;AAQY,QAAA,aAAa,GAAoB;IAC5C,kBAAkB,EAAlB,0BAAkB;IAClB,mBAAmB,EAAnB,2BAAmB;IACnB,oBAAoB,EAApB,4BAAoB;CACrB,CAAA"}
@@ -0,0 +1,42 @@
1
+ export declare const reset: (s: string) => string;
2
+ export declare const bold: (input: string) => string;
3
+ export declare const dim: (input: string) => string;
4
+ export declare const italic: (input: string) => string;
5
+ export declare const underline: (input: string) => string;
6
+ export declare const inverse: (input: string) => string;
7
+ export declare const hidden: (input: string) => string;
8
+ export declare const strikethrough: (input: string) => string;
9
+ export declare const black: (input: string) => string;
10
+ export declare const red: (input: string) => string;
11
+ export declare const green: (input: string) => string;
12
+ export declare const yellow: (input: string) => string;
13
+ export declare const blue: (input: string) => string;
14
+ export declare const magenta: (input: string) => string;
15
+ export declare const purple: (input: string) => string;
16
+ export declare const cyan: (input: string) => string;
17
+ export declare const white: (input: string) => string;
18
+ export declare const gray: (input: string) => string;
19
+ export declare const bgBlack: (input: string) => string;
20
+ export declare const bgRed: (input: string) => string;
21
+ export declare const bgGreen: (input: string) => string;
22
+ export declare const bgYellow: (input: string) => string;
23
+ export declare const bgBlue: (input: string) => string;
24
+ export declare const bgMagenta: (input: string) => string;
25
+ export declare const bgCyan: (input: string) => string;
26
+ export declare const bgWhite: (input: string) => string;
27
+ export declare const blackBright: (input: string) => string;
28
+ export declare const redBright: (input: string) => string;
29
+ export declare const greenBright: (input: string) => string;
30
+ export declare const yellowBright: (input: string) => string;
31
+ export declare const blueBright: (input: string) => string;
32
+ export declare const magentaBright: (input: string) => string;
33
+ export declare const cyanBright: (input: string) => string;
34
+ export declare const whiteBright: (input: string) => string;
35
+ export declare const bgBlackBright: (input: string) => string;
36
+ export declare const bgRedBright: (input: string) => string;
37
+ export declare const bgGreenBright: (input: string) => string;
38
+ export declare const bgYellowBright: (input: string) => string;
39
+ export declare const bgBlueBright: (input: string) => string;
40
+ export declare const bgMagentaBright: (input: string) => string;
41
+ export declare const bgCyanBright: (input: string) => string;
42
+ export declare const bgWhiteBright: (input: string) => string;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ // ISC License
3
+ var _a;
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.bgWhiteBright = exports.bgCyanBright = exports.bgMagentaBright = exports.bgBlueBright = exports.bgYellowBright = exports.bgGreenBright = exports.bgRedBright = exports.bgBlackBright = exports.whiteBright = exports.cyanBright = exports.magentaBright = exports.blueBright = exports.yellowBright = exports.greenBright = exports.redBright = exports.blackBright = exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.bgYellow = exports.bgGreen = exports.bgRed = exports.bgBlack = exports.gray = exports.white = exports.cyan = exports.purple = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = exports.black = exports.strikethrough = exports.hidden = exports.inverse = exports.underline = exports.italic = exports.dim = exports.bold = exports.reset = void 0;
6
+ // Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
7
+ // Permission to use, copy, modify, and/or distribute this software for any
8
+ // purpose with or without fee is hereby granted, provided that the above
9
+ // copyright notice and this permission notice appear in all copies.
10
+ // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
+ // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
+ // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
+ // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+ //
18
+ // https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1
19
+ const { env, stdout } = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.process) !== null && _a !== void 0 ? _a : {};
20
+ // const enabled =
21
+ // env &&
22
+ // !env.NO_COLOR &&
23
+ // (env.FORCE_COLOR || (stdout?.isTTY && !env.CI && env.TERM !== 'dumb'))
24
+ const enabled = env;
25
+ const replaceClose = (str, close, replace, index) => {
26
+ const start = str.substring(0, index) + replace;
27
+ const end = str.substring(index + close.length);
28
+ const nextIndex = end.indexOf(close);
29
+ return ~nextIndex
30
+ ? start + replaceClose(end, close, replace, nextIndex)
31
+ : start + end;
32
+ };
33
+ const formatter = (open, close, replace = open) => {
34
+ if (!enabled)
35
+ return String;
36
+ return (input) => {
37
+ const string = '' + input;
38
+ const index = string.indexOf(close, open.length);
39
+ return ~index
40
+ ? open + replaceClose(string, close, replace, index) + close
41
+ : open + string + close;
42
+ };
43
+ };
44
+ // text styles
45
+ exports.reset = enabled ? (s) => `\x1b[0m${s}\x1b[0m` : String;
46
+ exports.bold = formatter('\x1b[1m', '\x1b[22m', '\x1b[22m\x1b[1m');
47
+ exports.dim = formatter('\x1b[2m', '\x1b[22m', '\x1b[22m\x1b[2m');
48
+ exports.italic = formatter('\x1b[3m', '\x1b[23m');
49
+ exports.underline = formatter('\x1b[4m', '\x1b[24m');
50
+ exports.inverse = formatter('\x1b[7m', '\x1b[27m');
51
+ exports.hidden = formatter('\x1b[8m', '\x1b[28m');
52
+ exports.strikethrough = formatter('\x1b[9m', '\x1b[29m');
53
+ // text colors
54
+ exports.black = formatter('\x1b[30m', '\x1b[39m');
55
+ exports.red = formatter('\x1b[31m', '\x1b[39m');
56
+ exports.green = formatter('\x1b[32m', '\x1b[39m');
57
+ exports.yellow = formatter('\x1b[33m', '\x1b[39m');
58
+ exports.blue = formatter('\x1b[34m', '\x1b[39m');
59
+ exports.magenta = formatter('\x1b[35m', '\x1b[39m');
60
+ exports.purple = formatter('\x1b[38;2;173;127;168m', '\x1b[39m');
61
+ exports.cyan = formatter('\x1b[36m', '\x1b[39m');
62
+ exports.white = formatter('\x1b[37m', '\x1b[39m');
63
+ exports.gray = formatter('\x1b[90m', '\x1b[39m');
64
+ // background colors
65
+ exports.bgBlack = formatter('\x1b[40m', '\x1b[49m');
66
+ exports.bgRed = formatter('\x1b[41m', '\x1b[49m');
67
+ exports.bgGreen = formatter('\x1b[42m', '\x1b[49m');
68
+ exports.bgYellow = formatter('\x1b[43m', '\x1b[49m');
69
+ exports.bgBlue = formatter('\x1b[44m', '\x1b[49m');
70
+ exports.bgMagenta = formatter('\x1b[45m', '\x1b[49m');
71
+ exports.bgCyan = formatter('\x1b[46m', '\x1b[49m');
72
+ exports.bgWhite = formatter('\x1b[47m', '\x1b[49m');
73
+ // special text colors
74
+ exports.blackBright = formatter("\x1b[90m", "\x1b[39m");
75
+ exports.redBright = formatter("\x1b[91m", "\x1b[39m");
76
+ exports.greenBright = formatter("\x1b[92m", "\x1b[39m");
77
+ exports.yellowBright = formatter("\x1b[93m", "\x1b[39m");
78
+ exports.blueBright = formatter("\x1b[94m", "\x1b[39m");
79
+ exports.magentaBright = formatter("\x1b[95m", "\x1b[39m");
80
+ exports.cyanBright = formatter("\x1b[96m", "\x1b[39m");
81
+ exports.whiteBright = formatter("\x1b[97m", "\x1b[39m");
82
+ // special background colors
83
+ exports.bgBlackBright = formatter("\x1b[100m", "\x1b[49m");
84
+ exports.bgRedBright = formatter("\x1b[101m", "\x1b[49m");
85
+ exports.bgGreenBright = formatter("\x1b[102m", "\x1b[49m");
86
+ exports.bgYellowBright = formatter("\x1b[103m", "\x1b[49m");
87
+ exports.bgBlueBright = formatter("\x1b[104m", "\x1b[49m");
88
+ exports.bgMagentaBright = formatter("\x1b[105m", "\x1b[49m");
89
+ exports.bgCyanBright = formatter("\x1b[106m", "\x1b[49m");
90
+ exports.bgWhiteBright = formatter("\x1b[107m", "\x1b[49m");
91
+ //# sourceMappingURL=picocolor.js.map
@@ -0,0 +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,CAAA;AAEjD,kBAAkB;AAClB,WAAW;AACX,qBAAqB;AACrB,2EAA2E;AAE3E,MAAM,OAAO,GAAG,GAAG,CAAA;AAEnB,MAAM,YAAY,GAAG,CACnB,GAAW,EACX,KAAa,EACb,OAAe,EACf,KAAa,EACL,EAAE;IACV,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,OAAO,CAAA;IAC/C,MAAM,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/C,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACpC,OAAO,CAAC,SAAS;QACf,CAAC,CAAC,KAAK,GAAG,YAAY,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC;QACtD,CAAC,CAAC,KAAK,GAAG,GAAG,CAAA;AACjB,CAAC,CAAA;AA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AC/C,QAAA,SAAS,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAC7C,QAAA,WAAW,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAC/C,QAAA,YAAY,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAChD,QAAA,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAC9C,QAAA,aAAa,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AACjD,QAAA,UAAU,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAC9C,QAAA,WAAW,GAAG,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAE5D,4BAA4B;AACf,QAAA,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AAClD,QAAA,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AAChD,QAAA,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AAClD,QAAA,cAAc,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AACnD,QAAA,YAAY,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AACjD,QAAA,eAAe,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AACpD,QAAA,YAAY,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;AACjD,QAAA,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA"}
@@ -7,6 +7,8 @@ const https = tslib_1.__importStar(require("node:https"));
7
7
  const debug_1 = require("./debug");
8
8
  const token_1 = require("../node-persist/token");
9
9
  const safe_json_parse_1 = require("./safe-json-parse");
10
+ const debug_2 = require("./debug");
11
+ const picocolor_1 = require("./picocolor");
10
12
  function _redact(str) {
11
13
  if (!str)
12
14
  return '';
@@ -23,7 +25,7 @@ function request(url, options, data) {
23
25
  const req = _https.request(url, options !== null && options !== void 0 ? options : {}, (res) => tslib_1.__awaiter(this, void 0, void 0, function* () {
24
26
  if (res.statusCode === 401 || res.statusCode === 403) {
25
27
  yield (0, token_1.cleanTokens)();
26
- const err = new Error('[zephyr]: auth error, please try to build again');
28
+ const err = new Error(`${debug_2.brightRedBgName} ${(0, picocolor_1.red)(`Error [BU10018]: 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`)}`);
27
29
  err.stack = void 0;
28
30
  throw err;
29
31
  }
@@ -44,7 +46,7 @@ function request(url, options, data) {
44
46
  if ((typeof res.statusCode === 'number' && res.statusCode > 299) ||
45
47
  (typeof (parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.status) === 'number' &&
46
48
  (parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.status) > 299)) {
47
- return reject(`[zephyr]: Error from ${url}: \n ${(_c = parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.message) !== null && _c !== void 0 ? _c : _response}`);
49
+ return reject(`${debug_2.brightRedBgName} Error from ${url}: \n ${(_c = parsed_response === null || parsed_response === void 0 ? void 0 : parsed_response.message) !== null && _c !== void 0 ? _c : _response}`);
48
50
  }
49
51
  if (url.pathname.indexOf('application/logs') === -1)
50
52
  (0, debug_1.ze_log)(message);
@@ -52,7 +54,7 @@ function request(url, options, data) {
52
54
  });
53
55
  }));
54
56
  req.on('error', (e) => {
55
- (0, debug_1.ze_error)(`[${(options === null || options === void 0 ? void 0 : options.method) || 'GET'}][${url}]: ${Date.now() - req_start}ms \n ${_options_str}`, e);
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 Error: ${e}`);
56
58
  reject(e);
57
59
  });
58
60
  if (data) {
@@ -1 +1 @@
1
- {"version":3,"file":"ze-http-request.js","sourceRoot":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,eAAqB,mCAAK,SAAoB,CAAC,CAAC;gBAC3D,CAAC,CAAC,CAAC;YACL,CAAC,CAAA,CACF,CAAC;YAEF,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAU,EAAE,EAAE;gBAC7B,IAAA,gBAAQ,EAAC,EAAE,EACT,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,KAAI,KAAK,KAAK,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,SAAS,YAAY,cAAc,CAAC,EAAE,CACvG,CAAC;gBACF,MAAM,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC,CAAC,CAAC;YAEH,IAAI,IAAI,EAAE,CAAC;gBACT,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC;YAED,GAAG,CAAC,GAAG,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AAxED,0BAwEC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "license": "Apache-2.0",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-edge-contract",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "license": "Apache-2.0",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",
package/.eslintrc.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
- "rules": {}
8
- },
9
- {
10
- "files": ["*.ts", "*.tsx"],
11
- "rules": {}
12
- },
13
- {
14
- "files": ["*.js", "*.jsx"],
15
- "rules": {}
16
- },
17
- {
18
- "files": ["*.json"],
19
- "parser": "jsonc-eslint-parser",
20
- "rules": {
21
- "@nx/dependency-checks": "error"
22
- }
23
- }
24
- ]
25
- }
package/jest.config.ts DELETED
@@ -1,11 +0,0 @@
1
- /* eslint-disable */
2
- export default {
3
- displayName: 'zephyr-edge-contract',
4
- preset: '../../jest.preset.js',
5
- testEnvironment: 'node',
6
- transform: {
7
- '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
8
- },
9
- moduleFileExtensions: ['ts', 'js', 'html'],
10
- coverageDirectory: '../../coverage/libs/zephyr-edge-contract',
11
- };
package/project.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "name": "zephyr-edge-contract",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "libs/zephyr-edge-contract/src",
5
- "projectType": "library",
6
- "targets": {
7
- "build": {
8
- "executor": "@nx/js:tsc",
9
- "outputs": ["{options.outputPath}"],
10
- "options": {
11
- "rootDir": "libs/zephyr-edge-contract/src",
12
- "outputPath": "libs/zephyr-edge-contract/dist",
13
- "main": "libs/zephyr-edge-contract/src/index.ts",
14
- "tsConfig": "libs/zephyr-edge-contract/tsconfig.lib.json"
15
- }
16
- },
17
- "publish": {
18
- "command": "node tools/scripts/publish.mjs zephyr-edge-contract {args.ver} {args.tag}",
19
- "dependsOn": ["build"]
20
- },
21
- "lint": {
22
- "executor": "@nx/eslint:lint",
23
- "outputs": ["{options.outputFile}"]
24
- },
25
- "test": {
26
- "executor": "@nx/jest:jest",
27
- "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
28
- "options": {
29
- "jestConfig": "libs/zephyr-edge-contract/jest.config.ts"
30
- }
31
- }
32
- },
33
- "tags": []
34
- }
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "module": "commonjs",
5
- "forceConsistentCasingInFileNames": true,
6
- "strict": true,
7
- "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
- "noImplicitReturns": true,
10
- "noFallthroughCasesInSwitch": true,
11
- "esModuleInterop": true
12
- },
13
- "files": [],
14
- "include": [],
15
- "references": [
16
- {
17
- "path": "./tsconfig.lib.json"
18
- },
19
- {
20
- "path": "./tsconfig.spec.json"
21
- }
22
- ]
23
- }
package/tsconfig.lib.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "declaration": true,
6
- "types": ["node"]
7
- },
8
- "include": ["src/**/*.ts"],
9
- "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
10
- }
@@ -1,14 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "module": "commonjs",
6
- "types": ["jest", "node"]
7
- },
8
- "include": [
9
- "jest.config.ts",
10
- "src/**/*.test.ts",
11
- "src/**/*.spec.ts",
12
- "src/**/*.d.ts"
13
- ]
14
- }