@wix/create-app 0.0.169 → 0.0.170
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/build/{chunk-ZPLNYYYY.js → chunk-KLP34UUN.js} +5 -2
- package/build/chunk-KLP34UUN.js.map +1 -0
- package/build/{generator-XRFNCPHT.js → generator-AK5W7AYP.js} +2 -2
- package/build/index.js +58 -27
- package/build/index.js.map +1 -1
- package/package.json +3 -3
- package/build/chunk-ZPLNYYYY.js.map +0 -1
- /package/build/{generator-XRFNCPHT.js.map → generator-AK5W7AYP.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
pathExists,
|
|
14
14
|
require_is_git_url,
|
|
15
15
|
require_lib
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KLP34UUN.js";
|
|
17
17
|
import {
|
|
18
18
|
__commonJS,
|
|
19
19
|
__require,
|
|
@@ -3984,4 +3984,4 @@ ejs/lib/ejs.js:
|
|
|
3984
3984
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
3985
3985
|
*)
|
|
3986
3986
|
*/
|
|
3987
|
-
//# sourceMappingURL=generator-
|
|
3987
|
+
//# sourceMappingURL=generator-AK5W7AYP.js.map
|
package/build/index.js
CHANGED
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
setupTestEnv,
|
|
99
99
|
writeJson,
|
|
100
100
|
zod_default
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-KLP34UUN.js";
|
|
102
102
|
import {
|
|
103
103
|
__commonJS,
|
|
104
104
|
__dirname,
|
|
@@ -43609,6 +43609,23 @@ var accountAuthStrategy = {
|
|
|
43609
43609
|
async login({ deviceCode: deviceCode2, signal }) {
|
|
43610
43610
|
const accountAuth = await waitForLogin(deviceCode2, { signal });
|
|
43611
43611
|
return createAccountAuthState(accountAuth);
|
|
43612
|
+
},
|
|
43613
|
+
async loginWithRefreshToken({ refreshToken }) {
|
|
43614
|
+
const renewTokenResult = await client.renewToken({ refreshToken });
|
|
43615
|
+
if ((0, import_variant14.isType)(renewTokenResult, RenewTokenData.TokenRenewed)) {
|
|
43616
|
+
const newTokenData = renewTokenResult.payload;
|
|
43617
|
+
const userInfo2 = await client.userInfo({
|
|
43618
|
+
accessToken: newTokenData.accessToken
|
|
43619
|
+
});
|
|
43620
|
+
const result = { ...newTokenData, userInfo: userInfo2 };
|
|
43621
|
+
await deleteAuthData();
|
|
43622
|
+
await saveAuthData(result);
|
|
43623
|
+
return createAccountAuthState(result);
|
|
43624
|
+
}
|
|
43625
|
+
throw new CliError({
|
|
43626
|
+
code: CliErrorCode.FailedToLoginWithRefreshToken(),
|
|
43627
|
+
cause: null
|
|
43628
|
+
});
|
|
43612
43629
|
}
|
|
43613
43630
|
};
|
|
43614
43631
|
|
|
@@ -43630,19 +43647,28 @@ function useAuth() {
|
|
|
43630
43647
|
return context2;
|
|
43631
43648
|
}
|
|
43632
43649
|
|
|
43633
|
-
// ../../node_modules/@wix/bi-logger-
|
|
43650
|
+
// ../../node_modules/@wix/bi-logger-dev-tools-data/dist/esm/v2/index.js
|
|
43634
43651
|
init_esm_shims();
|
|
43635
43652
|
function wixCliCliCommand(params) {
|
|
43636
|
-
return { evid: 5200, src: 11, endpoint: "
|
|
43653
|
+
return { evid: 5200, src: 11, endpoint: "", params };
|
|
43637
43654
|
}
|
|
43638
43655
|
function wixCliCliCommandStatus(params) {
|
|
43639
|
-
return { evid: 5201, src: 11, endpoint: "
|
|
43656
|
+
return { evid: 5201, src: 11, endpoint: "", params };
|
|
43640
43657
|
}
|
|
43641
43658
|
function wixCliLoginStart(params) {
|
|
43642
|
-
return { evid: 5211, src: 11, endpoint: "
|
|
43659
|
+
return { evid: 5211, src: 11, endpoint: "", params };
|
|
43643
43660
|
}
|
|
43644
43661
|
function wixCliLoginEnd(params) {
|
|
43645
|
-
return { evid: 5212, src: 11, endpoint: "
|
|
43662
|
+
return { evid: 5212, src: 11, endpoint: "", params };
|
|
43663
|
+
}
|
|
43664
|
+
function wixCliAppFlowStepsAnswers(params) {
|
|
43665
|
+
return { evid: 5229, src: 11, endpoint: "", params };
|
|
43666
|
+
}
|
|
43667
|
+
function wixCliCliError(params) {
|
|
43668
|
+
return { evid: 5230, src: 11, endpoint: "", params };
|
|
43669
|
+
}
|
|
43670
|
+
function wixCliAction(params) {
|
|
43671
|
+
return { evid: 5231, src: 11, endpoint: "", params };
|
|
43646
43672
|
}
|
|
43647
43673
|
|
|
43648
43674
|
// ../cli-auth/src/components/Login.tsx
|
|
@@ -50722,7 +50748,9 @@ var createEnv = () => {
|
|
|
50722
50748
|
return {
|
|
50723
50749
|
isCI: overrides2.isCI ?? import_ci_info.default.isCI,
|
|
50724
50750
|
isPR: overrides2.isPR ?? import_ci_info.default.isPR,
|
|
50725
|
-
ciName: overrides2.ciName ?? import_ci_info.default.name ?? process.env.CI_NAME ?? null
|
|
50751
|
+
ciName: overrides2.ciName ?? import_ci_info.default.name ?? process.env.CI_NAME ?? null,
|
|
50752
|
+
cliEnvName: overrides2.cliEnvName ?? process.env.WIX_RUNTIME_ENVIRONMENT ?? null,
|
|
50753
|
+
cliTrackingId: overrides2.cliTrackingId ?? process.env.TRACKING_ID ?? null
|
|
50726
50754
|
};
|
|
50727
50755
|
};
|
|
50728
50756
|
|
|
@@ -51051,6 +51079,15 @@ function getErrorComponent(code, cause) {
|
|
|
51051
51079
|
}
|
|
51052
51080
|
);
|
|
51053
51081
|
},
|
|
51082
|
+
FailedToLoginWithRefreshToken: () => {
|
|
51083
|
+
return () => /* @__PURE__ */ import_react77.default.createElement(
|
|
51084
|
+
ErrorMessage,
|
|
51085
|
+
{
|
|
51086
|
+
message: "Failed to login with refresh token",
|
|
51087
|
+
hint: "Please check that your refresh token is valid and not revoked, then try again."
|
|
51088
|
+
}
|
|
51089
|
+
);
|
|
51090
|
+
},
|
|
51054
51091
|
FailedToRevokeRefreshToken: ({ email }) => {
|
|
51055
51092
|
return () => /* @__PURE__ */ import_react77.default.createElement(
|
|
51056
51093
|
SystemErrorMessage,
|
|
@@ -55220,6 +55257,9 @@ function toSafeJson(value2) {
|
|
|
55220
55257
|
}
|
|
55221
55258
|
return value2;
|
|
55222
55259
|
}
|
|
55260
|
+
function normalizeRequestId(requestId) {
|
|
55261
|
+
return requestId.split(",").map((id) => id.trim()).at(0) ?? requestId;
|
|
55262
|
+
}
|
|
55223
55263
|
|
|
55224
55264
|
// ../cli-error-reporting/src/error-reporter.ts
|
|
55225
55265
|
var ReportErrorResult = (0, import_variant16.variant)({
|
|
@@ -55236,7 +55276,10 @@ var reportError = (scope, originalError, { data } = {}) => {
|
|
|
55236
55276
|
captureContext: (localScope) => {
|
|
55237
55277
|
const httpError = extractHttpError(error);
|
|
55238
55278
|
if (httpError) {
|
|
55239
|
-
localScope.setTag(
|
|
55279
|
+
localScope.setTag(
|
|
55280
|
+
"request.id",
|
|
55281
|
+
normalizeRequestId(httpError.requestId)
|
|
55282
|
+
);
|
|
55240
55283
|
const errorInfo = getHttpErrorInfo(httpError);
|
|
55241
55284
|
errorInfo.request.data = toSafeJson(errorInfo.request.data);
|
|
55242
55285
|
errorInfo.response.data = toSafeJson(errorInfo.response.data);
|
|
@@ -55249,9 +55292,11 @@ var reportError = (scope, originalError, { data } = {}) => {
|
|
|
55249
55292
|
"Full Stack": import_verror3.default.fullStack(error)
|
|
55250
55293
|
});
|
|
55251
55294
|
}
|
|
55252
|
-
const { isCI: isCI3, isPR, ciName } = createEnv();
|
|
55295
|
+
const { isCI: isCI3, isPR, ciName, cliEnvName, cliTrackingId } = createEnv();
|
|
55253
55296
|
localScope.setTag("ci", yesOrNo(isCI3));
|
|
55254
55297
|
localScope.setTag("ci.name", ciName);
|
|
55298
|
+
localScope.setTag("cli.env_name", cliEnvName);
|
|
55299
|
+
localScope.setTag("cli.tracking_id", cliTrackingId);
|
|
55255
55300
|
localScope.setContext("CI", {
|
|
55256
55301
|
Name: ciName,
|
|
55257
55302
|
"Is CI": yesOrNo(isCI3),
|
|
@@ -57014,20 +57059,6 @@ var import_react96 = __toESM(require_react(), 1);
|
|
|
57014
57059
|
|
|
57015
57060
|
// src/bi/events.ts
|
|
57016
57061
|
init_esm_shims();
|
|
57017
|
-
|
|
57018
|
-
// ../../node_modules/@wix/bi-logger-dev-tools-data/dist/esm/v2/index.js
|
|
57019
|
-
init_esm_shims();
|
|
57020
|
-
function wixCliAppFlowStepsAnswers(params) {
|
|
57021
|
-
return { evid: 5229, src: 11, endpoint: "", params };
|
|
57022
|
-
}
|
|
57023
|
-
function wixCliCliError(params) {
|
|
57024
|
-
return { evid: 5230, src: 11, endpoint: "", params };
|
|
57025
|
-
}
|
|
57026
|
-
function wixCliAction(params) {
|
|
57027
|
-
return { evid: 5231, src: 11, endpoint: "", params };
|
|
57028
|
-
}
|
|
57029
|
-
|
|
57030
|
-
// src/bi/events.ts
|
|
57031
57062
|
var createAppBiEvents = (biLogger) => ({
|
|
57032
57063
|
cliAction: ({
|
|
57033
57064
|
question,
|
|
@@ -57217,7 +57248,7 @@ function reportCommandStartEvent({
|
|
|
57217
57248
|
}) {
|
|
57218
57249
|
const options = command.opts();
|
|
57219
57250
|
const args = command.args;
|
|
57220
|
-
const privateOptions = /* @__PURE__ */ new Set(["apiKey"]);
|
|
57251
|
+
const privateOptions = /* @__PURE__ */ new Set(["apiKey", "refreshToken"]);
|
|
57221
57252
|
const sanitizedOptions = Object.fromEntries(
|
|
57222
57253
|
Object.entries(options).map(([flagName, flagValue]) => {
|
|
57223
57254
|
const value2 = privateOptions.has(flagName) ? "<censored>" : flagValue;
|
|
@@ -57281,7 +57312,7 @@ function reportCommandStartEvent({
|
|
|
57281
57312
|
var package_default = {
|
|
57282
57313
|
name: "@wix/create-app",
|
|
57283
57314
|
description: "Create Wix apps",
|
|
57284
|
-
version: "0.0.
|
|
57315
|
+
version: "0.0.170",
|
|
57285
57316
|
author: "Ihor Machuzhak",
|
|
57286
57317
|
bin: "bin/index.cjs",
|
|
57287
57318
|
devDependencies: {
|
|
@@ -57291,7 +57322,7 @@ var package_default = {
|
|
|
57291
57322
|
"@types/react": "^18.3.3",
|
|
57292
57323
|
"@types/semver": "^7.5.8",
|
|
57293
57324
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
57294
|
-
"@wix/bi-logger-dev-tools-data": "^1.
|
|
57325
|
+
"@wix/bi-logger-dev-tools-data": "^1.144.0",
|
|
57295
57326
|
"@wix/cli-auth": "workspace:*",
|
|
57296
57327
|
"@wix/cli-error": "workspace:*",
|
|
57297
57328
|
"@wix/cli-error-reporting": "workspace:*",
|
|
@@ -67402,7 +67433,7 @@ function getTasks({
|
|
|
67402
67433
|
cause: e2
|
|
67403
67434
|
});
|
|
67404
67435
|
}
|
|
67405
|
-
const { generateApp } = await import("./generator-
|
|
67436
|
+
const { generateApp } = await import("./generator-AK5W7AYP.js");
|
|
67406
67437
|
await generateApp({
|
|
67407
67438
|
packageName,
|
|
67408
67439
|
packageFolder,
|