@siteping/cli 0.4.1 → 0.4.3
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/README.md +4 -1
- package/dist/index.js +202 -141
- package/dist/index.js.map +1 -1
- package/package.json +11 -2
package/dist/index.js
CHANGED
|
@@ -3391,10 +3391,10 @@ var require_src = __commonJS({
|
|
|
3391
3391
|
var require_picocolors = __commonJS({
|
|
3392
3392
|
"../../node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
|
|
3393
3393
|
"use strict";
|
|
3394
|
-
var
|
|
3395
|
-
var argv =
|
|
3396
|
-
var env =
|
|
3397
|
-
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") ||
|
|
3394
|
+
var p3 = process || {};
|
|
3395
|
+
var argv = p3.argv || [];
|
|
3396
|
+
var env = p3.env || {};
|
|
3397
|
+
var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p3.platform === "win32" || (p3.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
3398
3398
|
var formatter = (open, close, replace = open) => (input) => {
|
|
3399
3399
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
3400
3400
|
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
@@ -7024,7 +7024,7 @@ var require_model = __commonJS({
|
|
|
7024
7024
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
7025
7025
|
d3.__proto__ = b3;
|
|
7026
7026
|
} || function(d3, b3) {
|
|
7027
|
-
for (var
|
|
7027
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
7028
7028
|
};
|
|
7029
7029
|
return extendStatics(d2, b2);
|
|
7030
7030
|
};
|
|
@@ -8099,7 +8099,7 @@ var require_follow = __commonJS({
|
|
|
8099
8099
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
8100
8100
|
d3.__proto__ = b3;
|
|
8101
8101
|
} || function(d3, b3) {
|
|
8102
|
-
for (var
|
|
8102
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
8103
8103
|
};
|
|
8104
8104
|
return extendStatics(d2, b2);
|
|
8105
8105
|
};
|
|
@@ -9458,7 +9458,7 @@ var require_reg_exp = __commonJS({
|
|
|
9458
9458
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
9459
9459
|
d3.__proto__ = b3;
|
|
9460
9460
|
} || function(d3, b3) {
|
|
9461
|
-
for (var
|
|
9461
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
9462
9462
|
};
|
|
9463
9463
|
return extendStatics(d2, b2);
|
|
9464
9464
|
};
|
|
@@ -9709,7 +9709,7 @@ var require_lexer = __commonJS({
|
|
|
9709
9709
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
9710
9710
|
d3.__proto__ = b3;
|
|
9711
9711
|
} || function(d3, b3) {
|
|
9712
|
-
for (var
|
|
9712
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
9713
9713
|
};
|
|
9714
9714
|
return extendStatics(d2, b2);
|
|
9715
9715
|
};
|
|
@@ -11507,7 +11507,7 @@ var require_resolver = __commonJS({
|
|
|
11507
11507
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
11508
11508
|
d3.__proto__ = b3;
|
|
11509
11509
|
} || function(d3, b3) {
|
|
11510
|
-
for (var
|
|
11510
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
11511
11511
|
};
|
|
11512
11512
|
return extendStatics(d2, b2);
|
|
11513
11513
|
};
|
|
@@ -11684,7 +11684,7 @@ var require_interpreter = __commonJS({
|
|
|
11684
11684
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
11685
11685
|
d3.__proto__ = b3;
|
|
11686
11686
|
} || function(d3, b3) {
|
|
11687
|
-
for (var
|
|
11687
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
11688
11688
|
};
|
|
11689
11689
|
return extendStatics(d2, b2);
|
|
11690
11690
|
};
|
|
@@ -12199,7 +12199,7 @@ var require_lookahead = __commonJS({
|
|
|
12199
12199
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
12200
12200
|
d3.__proto__ = b3;
|
|
12201
12201
|
} || function(d3, b3) {
|
|
12202
|
-
for (var
|
|
12202
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
12203
12203
|
};
|
|
12204
12204
|
return extendStatics(d2, b2);
|
|
12205
12205
|
};
|
|
@@ -12645,7 +12645,7 @@ var require_checks = __commonJS({
|
|
|
12645
12645
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
12646
12646
|
d3.__proto__ = b3;
|
|
12647
12647
|
} || function(d3, b3) {
|
|
12648
|
-
for (var
|
|
12648
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
12649
12649
|
};
|
|
12650
12650
|
return extendStatics(d2, b2);
|
|
12651
12651
|
};
|
|
@@ -12663,8 +12663,8 @@ var require_checks = __commonJS({
|
|
|
12663
12663
|
__assign = Object.assign || function(t) {
|
|
12664
12664
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
12665
12665
|
s = arguments[i];
|
|
12666
|
-
for (var
|
|
12667
|
-
t[
|
|
12666
|
+
for (var p3 in s) if (Object.prototype.hasOwnProperty.call(s, p3))
|
|
12667
|
+
t[p3] = s[p3];
|
|
12668
12668
|
}
|
|
12669
12669
|
return t;
|
|
12670
12670
|
};
|
|
@@ -13190,7 +13190,7 @@ var require_exceptions_public = __commonJS({
|
|
|
13190
13190
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
13191
13191
|
d3.__proto__ = b3;
|
|
13192
13192
|
} || function(d3, b3) {
|
|
13193
|
-
for (var
|
|
13193
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
13194
13194
|
};
|
|
13195
13195
|
return extendStatics(d2, b2);
|
|
13196
13196
|
};
|
|
@@ -13310,7 +13310,7 @@ var require_recoverable = __commonJS({
|
|
|
13310
13310
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
13311
13311
|
d3.__proto__ = b3;
|
|
13312
13312
|
} || function(d3, b3) {
|
|
13313
|
-
for (var
|
|
13313
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
13314
13314
|
};
|
|
13315
13315
|
return extendStatics(d2, b2);
|
|
13316
13316
|
};
|
|
@@ -13708,7 +13708,7 @@ var require_looksahead = __commonJS({
|
|
|
13708
13708
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
13709
13709
|
d3.__proto__ = b3;
|
|
13710
13710
|
} || function(d3, b3) {
|
|
13711
|
-
for (var
|
|
13711
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
13712
13712
|
};
|
|
13713
13713
|
return extendStatics(d2, b2);
|
|
13714
13714
|
};
|
|
@@ -15625,7 +15625,7 @@ var require_parser = __commonJS({
|
|
|
15625
15625
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
15626
15626
|
d3.__proto__ = b3;
|
|
15627
15627
|
} || function(d3, b3) {
|
|
15628
|
-
for (var
|
|
15628
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
15629
15629
|
};
|
|
15630
15630
|
return extendStatics(d2, b2);
|
|
15631
15631
|
};
|
|
@@ -15868,7 +15868,7 @@ var require_model2 = __commonJS({
|
|
|
15868
15868
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
15869
15869
|
d3.__proto__ = b3;
|
|
15870
15870
|
} || function(d3, b3) {
|
|
15871
|
-
for (var
|
|
15871
|
+
for (var p3 in b3) if (Object.prototype.hasOwnProperty.call(b3, p3)) d3[p3] = b3[p3];
|
|
15872
15872
|
};
|
|
15873
15873
|
return extendStatics(d2, b2);
|
|
15874
15874
|
};
|
|
@@ -16222,8 +16222,8 @@ var require_api3 = __commonJS({
|
|
|
16222
16222
|
__assign = Object.assign || function(t) {
|
|
16223
16223
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
16224
16224
|
s = arguments[i];
|
|
16225
|
-
for (var
|
|
16226
|
-
t[
|
|
16225
|
+
for (var p3 in s) if (Object.prototype.hasOwnProperty.call(s, p3))
|
|
16226
|
+
t[p3] = s[p3];
|
|
16227
16227
|
}
|
|
16228
16228
|
return t;
|
|
16229
16229
|
};
|
|
@@ -16834,8 +16834,8 @@ var oD = (t, u2, F = {}) => {
|
|
|
16834
16834
|
F.trim !== false && (C[C.length - 1] = C[C.length - 1].trimStart());
|
|
16835
16835
|
let n = A(C[C.length - 1]);
|
|
16836
16836
|
if (E2 !== 0 && (n >= u2 && (F.wordWrap === false || F.trim === false) && (C.push(""), n = 0), (n > 0 || F.trim === false) && (C[C.length - 1] += " ", n++)), F.hard && D[E2] > u2) {
|
|
16837
|
-
const B2 = u2 - n,
|
|
16838
|
-
Math.floor((D[E2] - 1) / u2) <
|
|
16837
|
+
const B2 = u2 - n, p3 = 1 + Math.floor((D[E2] - B2 - 1) / u2);
|
|
16838
|
+
Math.floor((D[E2] - 1) / u2) < p3 && C.push(""), _(C, a2, u2);
|
|
16839
16839
|
continue;
|
|
16840
16840
|
}
|
|
16841
16841
|
if (n + D[E2] > u2 && n > 0 && D[E2] > 0) {
|
|
@@ -16858,8 +16858,8 @@ var oD = (t, u2, F = {}) => {
|
|
|
16858
16858
|
if (e2 += a2, v.has(a2)) {
|
|
16859
16859
|
const { groups: B2 } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${y}(?<uri>.*)${w})`).exec(o.slice(E2).join("")) || { groups: {} };
|
|
16860
16860
|
if (B2.code !== void 0) {
|
|
16861
|
-
const
|
|
16862
|
-
s =
|
|
16861
|
+
const p3 = Number.parseFloat(B2.code);
|
|
16862
|
+
s = p3 === CD ? void 0 : p3;
|
|
16863
16863
|
} else B2.uri !== void 0 && (i = B2.uri.length === 0 ? void 0 : B2.uri);
|
|
16864
16864
|
}
|
|
16865
16865
|
const n = iD.codes.get(Number(s));
|
|
@@ -17221,58 +17221,85 @@ var L2 = () => {
|
|
|
17221
17221
|
} };
|
|
17222
17222
|
};
|
|
17223
17223
|
|
|
17224
|
+
// src/prompts.ts
|
|
17225
|
+
var p2 = {
|
|
17226
|
+
cancel: ve,
|
|
17227
|
+
confirm: me,
|
|
17228
|
+
intro: we,
|
|
17229
|
+
isCancel: BD,
|
|
17230
|
+
log: v2,
|
|
17231
|
+
note: ye,
|
|
17232
|
+
outro: fe,
|
|
17233
|
+
spinner: L2,
|
|
17234
|
+
text: ue
|
|
17235
|
+
};
|
|
17236
|
+
|
|
17224
17237
|
// src/commands/doctor.ts
|
|
17225
17238
|
async function doctorCommand(options) {
|
|
17226
|
-
|
|
17227
|
-
const url = options.url ?? await
|
|
17228
|
-
message: "
|
|
17239
|
+
p2.intro("siteping \u2014 Network diagnostics");
|
|
17240
|
+
const url = options.url ?? await p2.text({
|
|
17241
|
+
message: "Development server URL",
|
|
17229
17242
|
placeholder: "http://localhost:3000",
|
|
17230
17243
|
defaultValue: "http://localhost:3000"
|
|
17231
17244
|
});
|
|
17232
|
-
if (
|
|
17233
|
-
|
|
17245
|
+
if (p2.isCancel(url)) {
|
|
17246
|
+
p2.cancel("Cancelled.");
|
|
17234
17247
|
process.exit(0);
|
|
17235
17248
|
}
|
|
17236
|
-
|
|
17237
|
-
|
|
17249
|
+
if (!/^https?:\/\//.test(url)) {
|
|
17250
|
+
p2.log.error("URL must start with http:// or https://");
|
|
17251
|
+
process.exit(1);
|
|
17252
|
+
}
|
|
17253
|
+
const endpoint = options.endpoint ?? await p2.text({
|
|
17254
|
+
message: "API endpoint path",
|
|
17238
17255
|
placeholder: "/api/siteping",
|
|
17239
17256
|
defaultValue: "/api/siteping"
|
|
17240
17257
|
});
|
|
17241
|
-
if (
|
|
17242
|
-
|
|
17258
|
+
if (p2.isCancel(endpoint)) {
|
|
17259
|
+
p2.cancel("Cancelled.");
|
|
17243
17260
|
process.exit(0);
|
|
17244
17261
|
}
|
|
17245
|
-
const
|
|
17246
|
-
const
|
|
17247
|
-
spinner.
|
|
17262
|
+
const projectName = "__siteping_health_check__";
|
|
17263
|
+
const fullUrl = new URL(`${endpoint}?projectName=${encodeURIComponent(projectName)}`, url).toString();
|
|
17264
|
+
const spinner = p2.spinner();
|
|
17265
|
+
spinner.start(`Testing connection to ${url}${endpoint}`);
|
|
17248
17266
|
try {
|
|
17249
17267
|
const start = performance.now();
|
|
17250
|
-
const response = await fetch(fullUrl);
|
|
17268
|
+
const response = await fetch(fullUrl, { signal: AbortSignal.timeout(1e4) });
|
|
17251
17269
|
const elapsed = Math.round(performance.now() - start);
|
|
17252
17270
|
if (response.ok) {
|
|
17253
|
-
|
|
17254
|
-
|
|
17271
|
+
let data;
|
|
17272
|
+
try {
|
|
17273
|
+
data = await response.json();
|
|
17274
|
+
} catch {
|
|
17275
|
+
data = null;
|
|
17276
|
+
}
|
|
17277
|
+
spinner.stop(`Connection successful (${elapsed}ms)`);
|
|
17255
17278
|
if (data && typeof data.total === "number") {
|
|
17256
|
-
|
|
17279
|
+
p2.log.success(`API is working \u2014 ${data.total} feedback(s) found`);
|
|
17257
17280
|
} else {
|
|
17258
|
-
|
|
17281
|
+
p2.log.warn("Unexpected response \u2014 make sure the endpoint uses createSitepingHandler()");
|
|
17259
17282
|
}
|
|
17260
17283
|
} else {
|
|
17261
|
-
spinner.stop(`
|
|
17284
|
+
spinner.stop(`HTTP error ${response.status} (${elapsed}ms)`);
|
|
17262
17285
|
const text = await response.text().catch(() => "");
|
|
17263
|
-
|
|
17264
|
-
if (text)
|
|
17286
|
+
p2.log.error(`Server responded with: ${response.status} ${response.statusText}`);
|
|
17287
|
+
if (text) p2.log.info(text.slice(0, 200));
|
|
17288
|
+
process.exit(1);
|
|
17265
17289
|
}
|
|
17266
17290
|
} catch (error) {
|
|
17267
|
-
spinner.stop("
|
|
17268
|
-
if (error instanceof
|
|
17269
|
-
|
|
17270
|
-
|
|
17291
|
+
spinner.stop("Connection failed");
|
|
17292
|
+
if (error instanceof DOMException && error.name === "TimeoutError") {
|
|
17293
|
+
p2.log.error("Request timed out after 10 seconds");
|
|
17294
|
+
} else if (error instanceof TypeError && String(error).includes("fetch")) {
|
|
17295
|
+
p2.log.error("Unable to connect \u2014 is the server running?");
|
|
17296
|
+
p2.log.info(`Check that ${url} is reachable`);
|
|
17271
17297
|
} else {
|
|
17272
|
-
|
|
17298
|
+
p2.log.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
17273
17299
|
}
|
|
17300
|
+
process.exit(1);
|
|
17274
17301
|
}
|
|
17275
|
-
|
|
17302
|
+
p2.outro("Diagnostics complete");
|
|
17276
17303
|
}
|
|
17277
17304
|
|
|
17278
17305
|
// src/generators/prisma.ts
|
|
@@ -17328,12 +17355,12 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
17328
17355
|
subClass.prototype.constructor = subClass;
|
|
17329
17356
|
_setPrototypeOf(subClass, superClass);
|
|
17330
17357
|
}
|
|
17331
|
-
function _setPrototypeOf(o,
|
|
17332
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2,
|
|
17333
|
-
o2.__proto__ =
|
|
17358
|
+
function _setPrototypeOf(o, p3) {
|
|
17359
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p4) {
|
|
17360
|
+
o2.__proto__ = p4;
|
|
17334
17361
|
return o2;
|
|
17335
17362
|
};
|
|
17336
|
-
return _setPrototypeOf(o,
|
|
17363
|
+
return _setPrototypeOf(o, p3);
|
|
17337
17364
|
}
|
|
17338
17365
|
var Identifier = /* @__PURE__ */ createToken({
|
|
17339
17366
|
name: "Identifier",
|
|
@@ -18443,13 +18470,13 @@ function computePropertyFormatting(list) {
|
|
|
18443
18470
|
}
|
|
18444
18471
|
|
|
18445
18472
|
// ../core/src/schema.ts
|
|
18446
|
-
var
|
|
18473
|
+
var _SITEPING_MODELS = {
|
|
18447
18474
|
SitepingFeedback: {
|
|
18448
18475
|
fields: {
|
|
18449
18476
|
id: { type: "String", isId: true, default: "cuid()" },
|
|
18450
18477
|
projectName: { type: "String" },
|
|
18451
18478
|
type: { type: "String" },
|
|
18452
|
-
message: { type: "String" },
|
|
18479
|
+
message: { type: "String", nativeType: "Text" },
|
|
18453
18480
|
status: { type: "String", default: '"open"' },
|
|
18454
18481
|
url: { type: "String" },
|
|
18455
18482
|
viewport: { type: "String" },
|
|
@@ -18459,12 +18486,13 @@ var SITEPING_MODELS = {
|
|
|
18459
18486
|
clientId: { type: "String", isUnique: true },
|
|
18460
18487
|
resolvedAt: { type: "DateTime", optional: true },
|
|
18461
18488
|
createdAt: { type: "DateTime", default: "now()" },
|
|
18489
|
+
updatedAt: { type: "DateTime", isUpdatedAt: true },
|
|
18462
18490
|
annotations: {
|
|
18463
18491
|
type: "SitepingAnnotation",
|
|
18464
18492
|
relation: { kind: "1-to-many", model: "SitepingAnnotation" }
|
|
18465
18493
|
}
|
|
18466
18494
|
},
|
|
18467
|
-
indexes: [{ fields: ["projectName"] }]
|
|
18495
|
+
indexes: [{ fields: ["projectName"] }, { fields: ["projectName", "status", "createdAt"] }]
|
|
18468
18496
|
},
|
|
18469
18497
|
SitepingAnnotation: {
|
|
18470
18498
|
fields: {
|
|
@@ -18480,15 +18508,15 @@ var SITEPING_MODELS = {
|
|
|
18480
18508
|
onDelete: "Cascade"
|
|
18481
18509
|
}
|
|
18482
18510
|
},
|
|
18483
|
-
cssSelector: { type: "String" },
|
|
18484
|
-
xpath: { type: "String" },
|
|
18485
|
-
textSnippet: { type: "String" },
|
|
18511
|
+
cssSelector: { type: "String", nativeType: "Text" },
|
|
18512
|
+
xpath: { type: "String", nativeType: "Text" },
|
|
18513
|
+
textSnippet: { type: "String", nativeType: "Text" },
|
|
18486
18514
|
elementTag: { type: "String" },
|
|
18487
18515
|
elementId: { type: "String", optional: true },
|
|
18488
|
-
textPrefix: { type: "String" },
|
|
18489
|
-
textSuffix: { type: "String" },
|
|
18516
|
+
textPrefix: { type: "String", nativeType: "Text" },
|
|
18517
|
+
textSuffix: { type: "String", nativeType: "Text" },
|
|
18490
18518
|
fingerprint: { type: "String" },
|
|
18491
|
-
neighborText: { type: "String" },
|
|
18519
|
+
neighborText: { type: "String", nativeType: "Text" },
|
|
18492
18520
|
xPct: { type: "Float" },
|
|
18493
18521
|
yPct: { type: "Float" },
|
|
18494
18522
|
wPct: { type: "Float" },
|
|
@@ -18503,12 +18531,13 @@ var SITEPING_MODELS = {
|
|
|
18503
18531
|
indexes: [{ fields: ["feedbackId"] }]
|
|
18504
18532
|
}
|
|
18505
18533
|
};
|
|
18534
|
+
var SITEPING_MODELS = Object.freeze(_SITEPING_MODELS);
|
|
18506
18535
|
|
|
18507
18536
|
// src/generators/prisma.ts
|
|
18508
18537
|
var DEFAULT_SCHEMA_PATH = "prisma/schema.prisma";
|
|
18509
18538
|
function syncPrismaModels(schemaPath = DEFAULT_SCHEMA_PATH) {
|
|
18510
18539
|
if (!existsSync(schemaPath)) {
|
|
18511
|
-
throw new Error(`
|
|
18540
|
+
throw new Error(`Schema file not found: ${schemaPath}`);
|
|
18512
18541
|
}
|
|
18513
18542
|
const source = readFileSync(schemaPath, "utf-8");
|
|
18514
18543
|
const schema = getSchema(source);
|
|
@@ -18570,7 +18599,7 @@ function syncPrismaModels(schemaPath = DEFAULT_SCHEMA_PATH) {
|
|
|
18570
18599
|
}
|
|
18571
18600
|
if (fieldsToAdd.length > 0) {
|
|
18572
18601
|
const createdAtIdx = existingModel.properties.findIndex(
|
|
18573
|
-
(
|
|
18602
|
+
(p3) => p3.type === "field" && p3.name === "createdAt"
|
|
18574
18603
|
);
|
|
18575
18604
|
if (createdAtIdx >= 0) {
|
|
18576
18605
|
existingModel.properties.splice(createdAtIdx, 0, ...fieldsToAdd);
|
|
@@ -18594,7 +18623,15 @@ function syncPrismaModels(schemaPath = DEFAULT_SCHEMA_PATH) {
|
|
|
18594
18623
|
}
|
|
18595
18624
|
if (addedModels.length > 0 || changes.length > 0) {
|
|
18596
18625
|
const output = printSchema(schema);
|
|
18597
|
-
|
|
18626
|
+
try {
|
|
18627
|
+
writeFileSync(schemaPath, output, "utf-8");
|
|
18628
|
+
} catch (error) {
|
|
18629
|
+
const code = error.code;
|
|
18630
|
+
if (code === "EACCES" || code === "EPERM") {
|
|
18631
|
+
throw new Error(`Permission denied: cannot write to ${schemaPath}. Check file permissions.`);
|
|
18632
|
+
}
|
|
18633
|
+
throw error;
|
|
18634
|
+
}
|
|
18598
18635
|
}
|
|
18599
18636
|
return { schemaPath, addedModels, changes };
|
|
18600
18637
|
}
|
|
@@ -18602,10 +18639,11 @@ function fieldsMatch(existing, expected) {
|
|
|
18602
18639
|
if (existing.fieldType !== expected.fieldType) return false;
|
|
18603
18640
|
if ((existing.optional ?? false) !== (expected.optional ?? false)) return false;
|
|
18604
18641
|
if ((existing.array ?? false) !== (expected.array ?? false)) return false;
|
|
18605
|
-
const
|
|
18606
|
-
const
|
|
18642
|
+
const attrKey = (a2) => a2.group ? `${a2.group}.${a2.name}` : a2.name;
|
|
18643
|
+
const existingAttrs = (existing.attributes ?? []).map(attrKey).sort();
|
|
18644
|
+
const expectedAttrs = (expected.attributes ?? []).map(attrKey).sort();
|
|
18607
18645
|
if (existingAttrs.length !== expectedAttrs.length) return false;
|
|
18608
|
-
return existingAttrs.every((
|
|
18646
|
+
return existingAttrs.every((key, i) => key === expectedAttrs[i]);
|
|
18609
18647
|
}
|
|
18610
18648
|
function describeChange(existing, expected) {
|
|
18611
18649
|
const parts = [];
|
|
@@ -18613,17 +18651,18 @@ function describeChange(existing, expected) {
|
|
|
18613
18651
|
parts.push(`${existing.fieldType} \u2192 ${expected.fieldType}`);
|
|
18614
18652
|
}
|
|
18615
18653
|
if ((existing.optional ?? false) !== (expected.optional ?? false)) {
|
|
18616
|
-
parts.push(expected.optional ? "
|
|
18654
|
+
parts.push(expected.optional ? "required \u2192 optional" : "optional \u2192 required");
|
|
18617
18655
|
}
|
|
18618
|
-
const
|
|
18619
|
-
const
|
|
18656
|
+
const attrKey = (a2) => a2.group ? `${a2.group}.${a2.name}` : a2.name;
|
|
18657
|
+
const existingAttrs = new Set((existing.attributes ?? []).map(attrKey));
|
|
18658
|
+
const expectedAttrs = new Set((expected.attributes ?? []).map(attrKey));
|
|
18620
18659
|
for (const attr of expectedAttrs) {
|
|
18621
18660
|
if (!existingAttrs.has(attr)) parts.push(`+@${attr}`);
|
|
18622
18661
|
}
|
|
18623
18662
|
for (const attr of existingAttrs) {
|
|
18624
18663
|
if (!expectedAttrs.has(attr)) parts.push(`-@${attr}`);
|
|
18625
18664
|
}
|
|
18626
|
-
return parts.join(", ") || "
|
|
18665
|
+
return parts.join(", ") || "attributes changed";
|
|
18627
18666
|
}
|
|
18628
18667
|
function formatFieldSignature(def) {
|
|
18629
18668
|
let sig = def.type;
|
|
@@ -18668,6 +18707,12 @@ function buildField(name, def) {
|
|
|
18668
18707
|
]
|
|
18669
18708
|
});
|
|
18670
18709
|
}
|
|
18710
|
+
if (def.nativeType) {
|
|
18711
|
+
field.attributes.push({ type: "attribute", name: def.nativeType, kind: "field", group: "db" });
|
|
18712
|
+
}
|
|
18713
|
+
if (def.isUpdatedAt) {
|
|
18714
|
+
field.attributes.push({ type: "attribute", name: "updatedAt", kind: "field" });
|
|
18715
|
+
}
|
|
18671
18716
|
if (def.isUnique) {
|
|
18672
18717
|
field.attributes.push({ type: "attribute", name: "unique", kind: "field" });
|
|
18673
18718
|
}
|
|
@@ -18715,9 +18760,9 @@ function buildBlockIndex(idx) {
|
|
|
18715
18760
|
}
|
|
18716
18761
|
function hasBlockIndex(model, idx) {
|
|
18717
18762
|
const key = idx.fields.join(",");
|
|
18718
|
-
return model.properties.some((
|
|
18719
|
-
if (
|
|
18720
|
-
const attr =
|
|
18763
|
+
return model.properties.some((p3) => {
|
|
18764
|
+
if (p3.type !== "attribute" || p3.name !== "index") return false;
|
|
18765
|
+
const attr = p3;
|
|
18721
18766
|
const firstArg = attr.args?.[0];
|
|
18722
18767
|
if (!firstArg || firstArg.type !== "attributeArgument") return false;
|
|
18723
18768
|
const val = firstArg.value;
|
|
@@ -18734,19 +18779,32 @@ import { dirname, join } from "path";
|
|
|
18734
18779
|
var ROUTE_TEMPLATE = `import { createSitepingHandler } from "@siteping/adapter-prisma";
|
|
18735
18780
|
import { prisma } from "@/lib/prisma";
|
|
18736
18781
|
|
|
18737
|
-
export const { GET, POST, PATCH, DELETE } = createSitepingHandler({
|
|
18782
|
+
export const { GET, POST, PATCH, DELETE, OPTIONS } = createSitepingHandler({
|
|
18783
|
+
prisma,
|
|
18784
|
+
// Uncomment to require authentication:
|
|
18785
|
+
// apiKey: process.env.SITEPING_API_KEY,
|
|
18786
|
+
// allowedOrigins: ["https://your-site.com"],
|
|
18787
|
+
});
|
|
18738
18788
|
`;
|
|
18739
18789
|
function generateRoute(basePath = process.cwd()) {
|
|
18740
18790
|
const appDir = existsSync2(join(basePath, "src", "app")) ? join(basePath, "src", "app") : join(basePath, "app");
|
|
18741
18791
|
if (!existsSync2(appDir)) {
|
|
18742
|
-
throw new Error("
|
|
18792
|
+
throw new Error("Cannot find the app/ directory. Are you in a Next.js App Router project?");
|
|
18743
18793
|
}
|
|
18744
18794
|
const routePath = join(appDir, "api", "siteping", "route.ts");
|
|
18745
18795
|
if (existsSync2(routePath)) {
|
|
18746
18796
|
return { created: false, path: routePath };
|
|
18747
18797
|
}
|
|
18748
|
-
|
|
18749
|
-
|
|
18798
|
+
try {
|
|
18799
|
+
mkdirSync(dirname(routePath), { recursive: true });
|
|
18800
|
+
writeFileSync2(routePath, ROUTE_TEMPLATE, "utf-8");
|
|
18801
|
+
} catch (error) {
|
|
18802
|
+
const code = error.code;
|
|
18803
|
+
if (code === "EACCES" || code === "EPERM") {
|
|
18804
|
+
throw new Error(`Permission denied: cannot write to ${routePath}. Check file permissions.`);
|
|
18805
|
+
}
|
|
18806
|
+
throw error;
|
|
18807
|
+
}
|
|
18750
18808
|
return { created: true, path: routePath };
|
|
18751
18809
|
}
|
|
18752
18810
|
|
|
@@ -18759,81 +18817,85 @@ function findPrismaSchema(cwd) {
|
|
|
18759
18817
|
join2(cwd, "schema.prisma"),
|
|
18760
18818
|
join2(cwd, "prisma", "schema", "schema.prisma")
|
|
18761
18819
|
];
|
|
18762
|
-
return candidates.find((
|
|
18820
|
+
return candidates.find((p3) => existsSync3(p3)) ?? null;
|
|
18763
18821
|
}
|
|
18764
18822
|
|
|
18765
18823
|
// src/commands/init.ts
|
|
18766
18824
|
async function initCommand() {
|
|
18767
|
-
|
|
18825
|
+
p2.intro("siteping \u2014 Setup");
|
|
18768
18826
|
const cwd = process.cwd();
|
|
18769
18827
|
const schemaPath = findPrismaSchema(cwd);
|
|
18770
18828
|
if (schemaPath) {
|
|
18771
|
-
|
|
18772
|
-
const shouldSync = await
|
|
18773
|
-
message: "
|
|
18829
|
+
p2.log.info(`Prisma schema found: ${schemaPath}`);
|
|
18830
|
+
const shouldSync = await p2.confirm({
|
|
18831
|
+
message: "Sync Siteping models to your Prisma schema?"
|
|
18774
18832
|
});
|
|
18775
|
-
if (
|
|
18776
|
-
|
|
18833
|
+
if (p2.isCancel(shouldSync)) {
|
|
18834
|
+
p2.cancel("Cancelled.");
|
|
18777
18835
|
process.exit(0);
|
|
18778
18836
|
}
|
|
18779
18837
|
if (shouldSync) {
|
|
18780
18838
|
try {
|
|
18781
18839
|
const { addedModels, changes } = syncPrismaModels(schemaPath);
|
|
18782
18840
|
if (addedModels.length > 0) {
|
|
18783
|
-
|
|
18841
|
+
p2.log.success(`Models synced: ${addedModels.join(", ")}`);
|
|
18784
18842
|
}
|
|
18785
18843
|
for (const change of changes) {
|
|
18786
18844
|
if (change.action === "added") {
|
|
18787
|
-
|
|
18845
|
+
p2.log.success(`${change.model}.${change.field} \u2014 added (${change.detail})`);
|
|
18788
18846
|
} else {
|
|
18789
|
-
|
|
18847
|
+
p2.log.success(`${change.model}.${change.field} \u2014 updated (${change.detail})`);
|
|
18790
18848
|
}
|
|
18791
18849
|
}
|
|
18792
18850
|
if (addedModels.length === 0 && changes.length === 0) {
|
|
18793
|
-
|
|
18851
|
+
p2.log.info("Schema is already up to date.");
|
|
18794
18852
|
}
|
|
18795
18853
|
} catch (error) {
|
|
18796
|
-
|
|
18854
|
+
p2.log.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
18855
|
+
p2.outro("Fix the errors above and re-run `siteping init`.");
|
|
18856
|
+
process.exit(1);
|
|
18797
18857
|
}
|
|
18798
18858
|
}
|
|
18799
18859
|
} else {
|
|
18800
|
-
|
|
18801
|
-
|
|
18860
|
+
p2.log.warn("No schema.prisma file found. You will need to add the models manually.");
|
|
18861
|
+
p2.log.info("See the documentation: https://github.com/NeosiaNexus/SitePing#prisma-schema-1");
|
|
18802
18862
|
}
|
|
18803
|
-
const shouldRoute = await
|
|
18804
|
-
message: "
|
|
18863
|
+
const shouldRoute = await p2.confirm({
|
|
18864
|
+
message: "Generate the Next.js App Router API route?"
|
|
18805
18865
|
});
|
|
18806
|
-
if (
|
|
18807
|
-
|
|
18866
|
+
if (p2.isCancel(shouldRoute)) {
|
|
18867
|
+
p2.cancel("Cancelled.");
|
|
18808
18868
|
process.exit(0);
|
|
18809
18869
|
}
|
|
18810
18870
|
if (shouldRoute) {
|
|
18811
18871
|
try {
|
|
18812
18872
|
const { created, path } = generateRoute(cwd);
|
|
18813
18873
|
if (created) {
|
|
18814
|
-
|
|
18874
|
+
p2.log.success(`Route created: ${path}`);
|
|
18815
18875
|
} else {
|
|
18816
|
-
|
|
18876
|
+
p2.log.info(`Route already exists: ${path}`);
|
|
18817
18877
|
}
|
|
18818
18878
|
} catch (error) {
|
|
18819
|
-
|
|
18879
|
+
p2.log.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
18880
|
+
p2.outro("Fix the errors above and re-run `siteping init`.");
|
|
18881
|
+
process.exit(1);
|
|
18820
18882
|
}
|
|
18821
18883
|
}
|
|
18822
|
-
|
|
18884
|
+
p2.note(
|
|
18823
18885
|
[
|
|
18824
|
-
"1.
|
|
18825
|
-
"2.
|
|
18886
|
+
"1. Run: npx prisma db push",
|
|
18887
|
+
"2. Add the widget to your layout:",
|
|
18826
18888
|
"",
|
|
18827
18889
|
' import { initSiteping } from "@siteping/widget"',
|
|
18828
18890
|
"",
|
|
18829
18891
|
" initSiteping({",
|
|
18830
18892
|
' endpoint: "/api/siteping",',
|
|
18831
|
-
' projectName: "
|
|
18893
|
+
' projectName: "my-project",',
|
|
18832
18894
|
" })"
|
|
18833
18895
|
].join("\n"),
|
|
18834
|
-
"
|
|
18896
|
+
"Next steps"
|
|
18835
18897
|
);
|
|
18836
|
-
|
|
18898
|
+
p2.outro("Setup complete!");
|
|
18837
18899
|
}
|
|
18838
18900
|
|
|
18839
18901
|
// src/commands/status.ts
|
|
@@ -18941,35 +19003,33 @@ function pad(label, width) {
|
|
|
18941
19003
|
}
|
|
18942
19004
|
function statusCommand(options) {
|
|
18943
19005
|
const cwd = process.cwd();
|
|
18944
|
-
we("siteping \u2014
|
|
19006
|
+
we("siteping \u2014 Status");
|
|
18945
19007
|
const schemaPath = options.schema ?? findPrismaSchema(cwd);
|
|
18946
19008
|
const schemaResult = checkSchema(schemaPath);
|
|
18947
19009
|
if (!schemaResult.found) {
|
|
18948
|
-
v2.error(`${pad("Prisma schema", 25)}
|
|
19010
|
+
v2.error(`${pad("Prisma schema", 25)}Not found`);
|
|
18949
19011
|
} else {
|
|
18950
19012
|
const issues = [
|
|
18951
|
-
...schemaResult.missingModels.map((m3) => `
|
|
19013
|
+
...schemaResult.missingModels.map((m3) => `model ${m3}`),
|
|
18952
19014
|
...schemaResult.missingFields,
|
|
18953
19015
|
...schemaResult.outdatedFields
|
|
18954
19016
|
];
|
|
18955
19017
|
if (issues.length === 0) {
|
|
18956
|
-
v2.success(`${pad("Prisma schema", 25)}
|
|
19018
|
+
v2.success(`${pad("Prisma schema", 25)}Up to date`);
|
|
18957
19019
|
} else {
|
|
18958
19020
|
const missingCount = schemaResult.missingModels.length + schemaResult.missingFields.length;
|
|
18959
19021
|
const outdatedCount = schemaResult.outdatedFields.length;
|
|
18960
19022
|
const parts = [];
|
|
18961
|
-
if (missingCount > 0)
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
parts.push(`${outdatedCount} champ${outdatedCount > 1 ? "s" : ""} obsol\xE8te${outdatedCount > 1 ? "s" : ""}`);
|
|
18965
|
-
v2.warn(`${pad("Prisma schema", 25)}\u26A0 ${parts.join(", ")} (${issues.join(", ")})`);
|
|
19023
|
+
if (missingCount > 0) parts.push(`${missingCount} missing field${missingCount > 1 ? "s" : ""}`);
|
|
19024
|
+
if (outdatedCount > 0) parts.push(`${outdatedCount} outdated field${outdatedCount > 1 ? "s" : ""}`);
|
|
19025
|
+
v2.warn(`${pad("Prisma schema", 25)}${parts.join(", ")} (${issues.join(", ")})`);
|
|
18966
19026
|
}
|
|
18967
19027
|
}
|
|
18968
19028
|
const routePath = findApiRoute(cwd);
|
|
18969
19029
|
if (routePath) {
|
|
18970
|
-
v2.success(`${pad("
|
|
19030
|
+
v2.success(`${pad("API route", 25)}${relative(cwd, routePath)}`);
|
|
18971
19031
|
} else {
|
|
18972
|
-
v2.error(`${pad("
|
|
19032
|
+
v2.error(`${pad("API route", 25)}Not found`);
|
|
18973
19033
|
}
|
|
18974
19034
|
const pkg = readPackageJson(cwd);
|
|
18975
19035
|
if (pkg) {
|
|
@@ -18977,27 +19037,28 @@ function statusCommand(options) {
|
|
|
18977
19037
|
const devDeps = pkg.devDependencies ?? {};
|
|
18978
19038
|
const version = deps["@siteping/widget"] ?? devDeps["@siteping/widget"];
|
|
18979
19039
|
if (version) {
|
|
18980
|
-
v2.success(`${pad("Package", 25)}
|
|
19040
|
+
v2.success(`${pad("Package", 25)}@siteping/widget@${version}`);
|
|
18981
19041
|
} else {
|
|
18982
|
-
v2.error(`${pad("Package", 25)}
|
|
19042
|
+
v2.error(`${pad("Package", 25)}@siteping/widget not found in package.json`);
|
|
18983
19043
|
}
|
|
18984
19044
|
} else {
|
|
18985
|
-
v2.error(`${pad("Package", 25)}
|
|
19045
|
+
v2.error(`${pad("Package", 25)}package.json not found`);
|
|
18986
19046
|
}
|
|
18987
19047
|
const widgetFile = findWidgetUsage(cwd);
|
|
18988
19048
|
if (widgetFile) {
|
|
18989
|
-
v2.success(`${pad("Widget
|
|
19049
|
+
v2.success(`${pad("Widget integration", 25)}found in ${relative(cwd, widgetFile)}`);
|
|
18990
19050
|
} else {
|
|
18991
|
-
v2.warn(`${pad("Widget
|
|
19051
|
+
v2.warn(`${pad("Widget integration", 25)}initSiteping not found in source files`);
|
|
18992
19052
|
}
|
|
18993
19053
|
const hasError = !schemaResult.found || !routePath || !pkg || pkg && !(pkg.dependencies?.["@siteping/widget"] ?? pkg.devDependencies?.["@siteping/widget"]);
|
|
18994
19054
|
const hasWarning = schemaResult.missingModels.length > 0 || schemaResult.missingFields.length > 0 || schemaResult.outdatedFields.length > 0 || !widgetFile;
|
|
18995
19055
|
if (hasError) {
|
|
18996
|
-
fe("
|
|
19056
|
+
fe("Some items are missing \u2014 run `siteping init` to set up.");
|
|
19057
|
+
process.exit(1);
|
|
18997
19058
|
} else if (hasWarning) {
|
|
18998
|
-
fe("
|
|
19059
|
+
fe("Some adjustments needed \u2014 run `siteping sync` to update.");
|
|
18999
19060
|
} else {
|
|
19000
|
-
fe("
|
|
19061
|
+
fe("Everything is set up!");
|
|
19001
19062
|
}
|
|
19002
19063
|
}
|
|
19003
19064
|
|
|
@@ -19007,44 +19068,44 @@ function syncCommand(options) {
|
|
|
19007
19068
|
const cwd = process.cwd();
|
|
19008
19069
|
const schemaPath = options.schema ?? findPrismaSchema(cwd);
|
|
19009
19070
|
if (!schemaPath) {
|
|
19010
|
-
v2.error("
|
|
19011
|
-
v2.info("
|
|
19071
|
+
v2.error("No schema.prisma file found.");
|
|
19072
|
+
v2.info("Specify the path with --schema <path>");
|
|
19012
19073
|
process.exit(1);
|
|
19013
19074
|
}
|
|
19014
19075
|
if (!existsSync5(schemaPath)) {
|
|
19015
|
-
v2.error(`
|
|
19076
|
+
v2.error(`File not found: ${schemaPath}`);
|
|
19016
19077
|
process.exit(1);
|
|
19017
19078
|
}
|
|
19018
19079
|
try {
|
|
19019
19080
|
const { addedModels, changes } = syncPrismaModels(schemaPath);
|
|
19020
19081
|
if (addedModels.length === 0 && changes.length === 0) {
|
|
19021
|
-
v2.info("
|
|
19082
|
+
v2.info("Schema is already up to date.");
|
|
19022
19083
|
return;
|
|
19023
19084
|
}
|
|
19024
19085
|
if (addedModels.length > 0) {
|
|
19025
|
-
v2.success(`
|
|
19086
|
+
v2.success(`Models synced: ${addedModels.join(", ")}`);
|
|
19026
19087
|
}
|
|
19027
19088
|
for (const change of changes) {
|
|
19028
19089
|
const icon = change.action === "added" ? "+" : "~";
|
|
19029
19090
|
v2.success(
|
|
19030
|
-
`${icon} ${change.model}.${change.field} \u2014 ${change.action === "added" ? "
|
|
19091
|
+
`${icon} ${change.model}.${change.field} \u2014 ${change.action === "added" ? "added" : "updated"} (${change.detail})`
|
|
19031
19092
|
);
|
|
19032
19093
|
}
|
|
19033
|
-
v2.info("
|
|
19094
|
+
v2.info("Don't forget to run: npx prisma db push");
|
|
19034
19095
|
} catch (error) {
|
|
19035
|
-
v2.error(`
|
|
19096
|
+
v2.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
19036
19097
|
process.exit(1);
|
|
19037
19098
|
}
|
|
19038
19099
|
}
|
|
19039
19100
|
|
|
19040
19101
|
// src/index.ts
|
|
19041
|
-
var program2 = new Command().name("siteping").description("CLI
|
|
19042
|
-
program2.command("init").description("
|
|
19043
|
-
program2.command("sync").description("
|
|
19044
|
-
program2.command("status").description("
|
|
19045
|
-
program2.command("doctor").description("Test
|
|
19102
|
+
var program2 = new Command().name("siteping").description("CLI to configure @siteping/* in your project").version("0.4.3");
|
|
19103
|
+
program2.command("init").description("Set up the Prisma schema and API route in your project").action(initCommand).addHelpText("after", "\n Examples:\n $ siteping init");
|
|
19104
|
+
program2.command("sync").description("Sync the Prisma schema (non-interactive, CI-friendly)").option("--schema <path>", "Path to the schema.prisma file").action(syncCommand).addHelpText("after", "\n Examples:\n $ siteping sync\n $ siteping sync --schema prisma/schema.prisma");
|
|
19105
|
+
program2.command("status").description("Full diagnostic of the Siteping integration").option("--schema <path>", "Path to the schema.prisma file").action(statusCommand).addHelpText("after", "\n Examples:\n $ siteping status\n $ siteping status --schema prisma/schema.prisma");
|
|
19106
|
+
program2.command("doctor").description("Test the connection to the Siteping API").option("--url <url>", "Server URL (default: http://localhost:3000)").option("--endpoint <path>", "Endpoint path (default: /api/siteping)").action(doctorCommand).addHelpText(
|
|
19046
19107
|
"after",
|
|
19047
|
-
"\n Examples:\n $ siteping doctor\n $ siteping doctor --url https://staging.example.com --
|
|
19108
|
+
"\n Examples:\n $ siteping doctor\n $ siteping doctor --url https://staging.example.com --endpoint /api/feedback"
|
|
19048
19109
|
);
|
|
19049
19110
|
program2.parse();
|
|
19050
19111
|
//# sourceMappingURL=index.js.map
|