@embeddable.com/sdk-core 3.13.0-next.4 → 3.13.0

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/lib/index.esm.js CHANGED
@@ -3,14 +3,12 @@ import { readdir, lstat } from 'node:fs/promises';
3
3
  import * as path from 'node:path';
4
4
  import path__default, { join } from 'node:path';
5
5
  import * as vite from 'vite';
6
- import ora from 'ora';
7
6
  import 'node:child_process';
8
7
  import * as crypto from 'node:crypto';
9
8
  import * as fs$1 from 'node:fs';
10
9
  import { existsSync } from 'node:fs';
11
10
  import { createNodeLogger, createNodeSys } from '@stencil/core/sys/node';
12
11
  import { loadConfig, createCompiler } from '@stencil/core/compiler';
13
- import * as sorcery from 'sorcery';
14
12
  import * as os from 'node:os';
15
13
  import * as YAML from 'yaml';
16
14
  import * as url from 'node:url';
@@ -19,20 +17,18 @@ import require$$1 from 'os';
19
17
  import require$$3 from 'http';
20
18
  import require$$4 from 'https';
21
19
  import require$$0$1 from 'url';
22
- import require$$2$1, { createReadStream } from 'fs';
20
+ import * as require$$2$1 from 'fs';
21
+ import require$$2__default, { createReadStream } from 'fs';
23
22
  import * as path$1 from 'path';
24
23
  import path__default$1, { basename } from 'path';
25
24
  import axios from 'axios';
26
- import archiver from 'archiver';
25
+ import * as archiver from 'archiver';
27
26
  import { select } from '@inquirer/prompts';
28
27
  import * as http from 'node:http';
29
28
  import { WebSocketServer } from 'ws';
30
29
  import * as chokidar from 'chokidar';
31
- import minimist from 'minimist';
32
30
  import fg from 'fast-glob';
33
31
  import * as dotenv from 'dotenv';
34
- import finalhandler from 'finalhandler';
35
- import serveStatic from 'serve-static';
36
32
  import { stat } from 'fs/promises';
37
33
 
38
34
  var findFiles = async (initialSrcDir, regex) => {
@@ -286,7 +282,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
286
282
  var errorUtil$1;
287
283
  (function (errorUtil) {
288
284
  errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
289
- errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === undefined ? undefined : message.message;
285
+ errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
290
286
  })(errorUtil$1 || (errorUtil$1 = {}));
291
287
  var ZodFirstPartyTypeKind$1;
292
288
  (function (ZodFirstPartyTypeKind) {
@@ -371,9 +367,11 @@ const getContentHash = (contentString) => {
371
367
  .substring(0, 5);
372
368
  };
373
369
 
370
+ const oraP$4 = import('ora');
374
371
  const EMB_TYPE_FILE_REGEX = /^(.*)\.type\.emb\.[jt]s$/;
375
372
  const EMB_OPTIONS_FILE_REGEX = /^(.*)\.options\.emb\.[jt]s$/;
376
373
  var buildTypes = async (ctx) => {
374
+ const ora = (await oraP$4).default;
377
375
  const progress = ora("Building types...").start();
378
376
  await generate$1(ctx);
379
377
  await build$1(ctx);
@@ -406,7 +404,7 @@ async function build$1(ctx) {
406
404
  outDir: ctx.client.buildDir,
407
405
  },
408
406
  });
409
- if (!((_a = ctx.dev) === null || _a === undefined ? undefined : _a.watch)) {
407
+ if (!((_a = ctx.dev) === null || _a === void 0 ? void 0 : _a.watch)) {
410
408
  const fileContent = await fs.readFile(typesFilePath, "utf8");
411
409
  const fileHash = getContentHash(fileContent);
412
410
  const fileName = `embeddable-types-${fileHash}.js`;
@@ -435,6 +433,7 @@ async function createComponentDir(dir) {
435
433
  await fs.mkdir(dir);
436
434
  }
437
435
 
436
+ const sorcery = require("sorcery");
438
437
  const STYLE_IMPORTS_TOKEN = "{{STYLES_IMPORT}}";
439
438
  const RENDER_IMPORT_TOKEN = "{{RENDER_IMPORT}}";
440
439
  // stencil doesn't support dynamic component tag name, so we need to replace it manually
@@ -483,8 +482,8 @@ async function addComponentTagName(filePath, bundleHash) {
483
482
  }
484
483
  async function runStencil(ctx) {
485
484
  var _a, _b;
486
- const logger = ((_a = ctx.dev) === null || _a === undefined ? undefined : _a.logger) || createNodeLogger();
487
- const sys = ((_b = ctx.dev) === null || _b === undefined ? undefined : _b.sys) || createNodeSys({ process });
485
+ const logger = ((_a = ctx.dev) === null || _a === void 0 ? void 0 : _a.logger) || createNodeLogger();
486
+ const sys = ((_b = ctx.dev) === null || _b === void 0 ? void 0 : _b.sys) || createNodeSys({ process });
488
487
  const devMode = !!ctx.dev;
489
488
  const isWindows = process.platform === "win32";
490
489
  const validated = await loadConfig({
@@ -530,7 +529,7 @@ async function handleStencilBuildOutput(ctx) {
530
529
  var _a;
531
530
  const entryFilePath = path.resolve(ctx.client.stencilBuild, "embeddable-wrapper.esm.js");
532
531
  let fileName = "embeddable-wrapper.esm.js";
533
- if (!((_a = ctx.dev) === null || _a === undefined ? undefined : _a.watch)) {
532
+ if (!((_a = ctx.dev) === null || _a === void 0 ? void 0 : _a.watch)) {
534
533
  const entryFileContent = await fs.readFile(entryFilePath, "utf8");
535
534
  const fileHash = getContentHash(entryFileContent);
536
535
  fileName = `embeddable-wrapper.esm-${fileHash}.js`;
@@ -562,16 +561,12 @@ async function generateSourceMap(ctx, pluginName) {
562
561
  const CREDENTIALS_DIR = path.resolve(os.homedir(), ".embeddable");
563
562
  const CREDENTIALS_FILE = path.resolve(CREDENTIALS_DIR, "credentials");
564
563
 
564
+ const oraP$3 = import('ora');
565
565
  const checkNodeVersion = async () => {
566
+ const ora = (await oraP$3).default;
566
567
  const spinner = ora("Checking node version...").start();
567
568
  const [major, minor] = process.versions.node.split(".").map(Number);
568
- let packageJson;
569
- try {
570
- packageJson = JSON.parse(await fs.readFile(path__default.join(import.meta.dirname, "../package.json"), "utf-8"));
571
- }
572
- catch (e) {
573
- throw new Error("Failed to read package.json of core-sdk");
574
- }
569
+ const packageJson = await Promise.resolve().then(function () { return _package$1; });
575
570
  const { engines: { node }, } = packageJson;
576
571
  const [minMajor, minMinor] = node
577
572
  .split(".")
@@ -687,17 +682,17 @@ var cleanup = async (ctx) => {
687
682
  await moveBuildTOBuildDir(ctx);
688
683
  };
689
684
  async function createManifest({ ctx, typesFileName, metaFileName, editorsMetaFileName, stencilWrapperFileName, }) {
690
- var _a, _b, _c, _d, _e;
685
+ var _a, _b, _c, _d;
691
686
  const sdkVersions = getSDKVersions();
692
687
  // identify user's package manager and its version
693
688
  let packageManager = "npm";
694
- if ((_a = process.env.npm_config_user_agent) === null || _a === undefined ? undefined : _a.includes("yarn")) {
689
+ if ((_a = process.env.npm_config_user_agent) === null || _a === void 0 ? void 0 : _a.includes("yarn")) {
695
690
  packageManager = "yarn";
696
691
  }
697
- if ((_b = process.env.npm_config_user_agent) === null || _b === undefined ? undefined : _b.includes("pnpm")) {
692
+ if ((_b = process.env.npm_config_user_agent) === null || _b === void 0 ? void 0 : _b.includes("pnpm")) {
698
693
  packageManager = "pnpm";
699
694
  }
700
- const packageManagerVersion = ((_d = (_c = process.env.npm_config_user_agent) === null || _c === undefined ? undefined : _c.match(/(\d+\.\d+\.\d+)/)) === null || _d === undefined ? undefined : _d[0]) ||
695
+ const packageManagerVersion = ((_d = (_c = process.env.npm_config_user_agent) === null || _c === void 0 ? void 0 : _c.match(/(\d+\.\d+\.\d+)/)) === null || _d === void 0 ? void 0 : _d[0]) ||
701
696
  "unknown";
702
697
  // write manifest file with files with hash
703
698
  const manifest = {
@@ -717,7 +712,6 @@ async function createManifest({ ctx, typesFileName, metaFileName, editorsMetaFil
717
712
  metrics: {
718
713
  buildTime: hrtimeToISO8601(ctx.buildTime),
719
714
  },
720
- origin: ((_e = ctx.dev) === null || _e === undefined ? undefined : _e.watch) ? "dev" : "push",
721
715
  },
722
716
  };
723
717
  await fs.writeFile(path.join(ctx.client.tmpDir, "embeddable-manifest.json"), JSON.stringify(manifest));
@@ -1283,12 +1277,12 @@ PERFORMANCE OF THIS SOFTWARE.
1283
1277
  ***************************************************************************** */
1284
1278
 
1285
1279
  function __classPrivateFieldGet(receiver, state, kind, f) {
1286
- if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1280
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1287
1281
  return state.get(receiver);
1288
1282
  }
1289
1283
 
1290
1284
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
1291
- if (typeof state === "function" ? receiver !== state || true : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1285
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1292
1286
  return (state.set(receiver, value)), value;
1293
1287
  }
1294
1288
 
@@ -1300,7 +1294,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
1300
1294
  var errorUtil;
1301
1295
  (function (errorUtil) {
1302
1296
  errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
1303
- errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === undefined ? undefined : message.message;
1297
+ errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
1304
1298
  })(errorUtil || (errorUtil = {}));
1305
1299
 
1306
1300
  var _ZodEnum_cache, _ZodNativeEnum_cache;
@@ -1357,14 +1351,14 @@ function processCreateParams(params) {
1357
1351
  var _a, _b;
1358
1352
  const { message } = params;
1359
1353
  if (iss.code === "invalid_enum_value") {
1360
- return { message: message !== null && message !== undefined ? message : ctx.defaultError };
1354
+ return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
1361
1355
  }
1362
1356
  if (typeof ctx.data === "undefined") {
1363
- return { message: (_a = message !== null && message !== undefined ? message : required_error) !== null && _a !== undefined ? _a : ctx.defaultError };
1357
+ return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
1364
1358
  }
1365
1359
  if (iss.code !== "invalid_type")
1366
1360
  return { message: ctx.defaultError };
1367
- return { message: (_b = message !== null && message !== undefined ? message : invalid_type_error) !== null && _b !== undefined ? _b : ctx.defaultError };
1361
+ return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
1368
1362
  };
1369
1363
  return { errorMap: customMap, description };
1370
1364
  }
@@ -1449,10 +1443,10 @@ class ZodType {
1449
1443
  const ctx = {
1450
1444
  common: {
1451
1445
  issues: [],
1452
- async: (_a = params === null || params === undefined ? undefined : params.async) !== null && _a !== undefined ? _a : false,
1453
- contextualErrorMap: params === null || params === undefined ? undefined : params.errorMap,
1446
+ async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
1447
+ contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
1454
1448
  },
1455
- path: (params === null || params === undefined ? undefined : params.path) || [],
1449
+ path: (params === null || params === void 0 ? void 0 : params.path) || [],
1456
1450
  schemaErrorMap: this._def.errorMap,
1457
1451
  parent: null,
1458
1452
  data,
@@ -1471,10 +1465,10 @@ class ZodType {
1471
1465
  const ctx = {
1472
1466
  common: {
1473
1467
  issues: [],
1474
- contextualErrorMap: params === null || params === undefined ? undefined : params.errorMap,
1468
+ contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
1475
1469
  async: true,
1476
1470
  },
1477
- path: (params === null || params === undefined ? undefined : params.path) || [],
1471
+ path: (params === null || params === void 0 ? void 0 : params.path) || [],
1478
1472
  schemaErrorMap: this._def.errorMap,
1479
1473
  parent: null,
1480
1474
  data,
@@ -2046,10 +2040,10 @@ class ZodString extends ZodType {
2046
2040
  }
2047
2041
  return this._addCheck({
2048
2042
  kind: "datetime",
2049
- precision: typeof (options === null || options === undefined ? undefined : options.precision) === "undefined" ? null : options === null || options === undefined ? undefined : options.precision,
2050
- offset: (_a = options === null || options === undefined ? undefined : options.offset) !== null && _a !== undefined ? _a : false,
2051
- local: (_b = options === null || options === undefined ? undefined : options.local) !== null && _b !== undefined ? _b : false,
2052
- ...errorUtil.errToObj(options === null || options === undefined ? undefined : options.message),
2043
+ precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2044
+ offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
2045
+ local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
2046
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
2053
2047
  });
2054
2048
  }
2055
2049
  date(message) {
@@ -2065,8 +2059,8 @@ class ZodString extends ZodType {
2065
2059
  }
2066
2060
  return this._addCheck({
2067
2061
  kind: "time",
2068
- precision: typeof (options === null || options === undefined ? undefined : options.precision) === "undefined" ? null : options === null || options === undefined ? undefined : options.precision,
2069
- ...errorUtil.errToObj(options === null || options === undefined ? undefined : options.message),
2062
+ precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
2063
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
2070
2064
  });
2071
2065
  }
2072
2066
  duration(message) {
@@ -2083,8 +2077,8 @@ class ZodString extends ZodType {
2083
2077
  return this._addCheck({
2084
2078
  kind: "includes",
2085
2079
  value: value,
2086
- position: options === null || options === undefined ? undefined : options.position,
2087
- ...errorUtil.errToObj(options === null || options === undefined ? undefined : options.message),
2080
+ position: options === null || options === void 0 ? void 0 : options.position,
2081
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
2088
2082
  });
2089
2083
  }
2090
2084
  startsWith(value, message) {
@@ -2215,7 +2209,7 @@ ZodString.create = (params) => {
2215
2209
  return new ZodString({
2216
2210
  checks: [],
2217
2211
  typeName: ZodFirstPartyTypeKind.ZodString,
2218
- coerce: (_a = params === null || params === undefined ? undefined : params.coerce) !== null && _a !== undefined ? _a : false,
2212
+ coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2219
2213
  ...processCreateParams(params),
2220
2214
  });
2221
2215
  };
@@ -2469,7 +2463,7 @@ ZodNumber.create = (params) => {
2469
2463
  return new ZodNumber({
2470
2464
  checks: [],
2471
2465
  typeName: ZodFirstPartyTypeKind.ZodNumber,
2472
- coerce: (params === null || params === undefined ? undefined : params.coerce) || false,
2466
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2473
2467
  ...processCreateParams(params),
2474
2468
  });
2475
2469
  };
@@ -2642,7 +2636,7 @@ ZodBigInt.create = (params) => {
2642
2636
  return new ZodBigInt({
2643
2637
  checks: [],
2644
2638
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
2645
- coerce: (_a = params === null || params === undefined ? undefined : params.coerce) !== null && _a !== undefined ? _a : false,
2639
+ coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2646
2640
  ...processCreateParams(params),
2647
2641
  });
2648
2642
  };
@@ -2667,7 +2661,7 @@ class ZodBoolean extends ZodType {
2667
2661
  ZodBoolean.create = (params) => {
2668
2662
  return new ZodBoolean({
2669
2663
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
2670
- coerce: (params === null || params === undefined ? undefined : params.coerce) || false,
2664
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2671
2665
  ...processCreateParams(params),
2672
2666
  });
2673
2667
  };
@@ -2777,7 +2771,7 @@ class ZodDate extends ZodType {
2777
2771
  ZodDate.create = (params) => {
2778
2772
  return new ZodDate({
2779
2773
  checks: [],
2780
- coerce: (params === null || params === undefined ? undefined : params.coerce) || false,
2774
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2781
2775
  typeName: ZodFirstPartyTypeKind.ZodDate,
2782
2776
  ...processCreateParams(params),
2783
2777
  });
@@ -3205,10 +3199,10 @@ class ZodObject extends ZodType {
3205
3199
  ? {
3206
3200
  errorMap: (issue, ctx) => {
3207
3201
  var _a, _b, _c, _d;
3208
- const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === undefined ? undefined : _b.call(_a, issue, ctx).message) !== null && _c !== undefined ? _c : ctx.defaultError;
3202
+ const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
3209
3203
  if (issue.code === "unrecognized_keys")
3210
3204
  return {
3211
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== undefined ? _d : defaultError,
3205
+ message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,
3212
3206
  };
3213
3207
  return {
3214
3208
  message: defaultError,
@@ -4218,7 +4212,7 @@ function createZodEnum(values, params) {
4218
4212
  class ZodEnum extends ZodType {
4219
4213
  constructor() {
4220
4214
  super(...arguments);
4221
- _ZodEnum_cache.set(this, undefined);
4215
+ _ZodEnum_cache.set(this, void 0);
4222
4216
  }
4223
4217
  _parse(input) {
4224
4218
  if (typeof input.data !== "string") {
@@ -4288,7 +4282,7 @@ ZodEnum.create = createZodEnum;
4288
4282
  class ZodNativeEnum extends ZodType {
4289
4283
  constructor() {
4290
4284
  super(...arguments);
4291
- _ZodNativeEnum_cache.set(this, undefined);
4285
+ _ZodNativeEnum_cache.set(this, void 0);
4292
4286
  }
4293
4287
  _parse(input) {
4294
4288
  const nativeEnumValues = util$1.getValidEnumValues(this._def.values);
@@ -4772,7 +4766,7 @@ fatal) {
4772
4766
  : typeof params === "string"
4773
4767
  ? { message: params }
4774
4768
  : params;
4775
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== undefined ? _a : fatal) !== null && _b !== undefined ? _b : true;
4769
+ const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4776
4770
  const p2 = typeof p === "string" ? { message: p } : p;
4777
4771
  ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
4778
4772
  }
@@ -4991,6 +4985,7 @@ const SECURITY_CONTEXT_FILE_REGEX = /^(.*)\.sc\.ya?ml$/;
4991
4985
  const CLIENT_CONTEXT_FILE_REGEX = /^(.*)\.cc\.ya?ml$/;
4992
4986
  var validate = async (ctx) => {
4993
4987
  checkNodeVersion();
4988
+ const ora = (await import('ora')).default;
4994
4989
  const spinnerValidate = ora("Data model validation...").start();
4995
4990
  const cubeFilesList = await findFiles(ctx.client.modelsSrc || ctx.client.srcDir, CUBE_YAML_FILE_REGEX);
4996
4991
  const securityContextFilesList = await findFiles(ctx.client.presetsSrc || ctx.client.srcDir, SECURITY_CONTEXT_FILE_REGEX);
@@ -5137,7 +5132,7 @@ const cubeModelSchema = z
5137
5132
  .array()
5138
5133
  .min(1),
5139
5134
  })
5140
- .refine((data) => data.cubes.every((cube) => { var _a, _b; return ((_a = cube.dimensions) === null || _a === undefined ? undefined : _a.length) || ((_b = cube.measures) === null || _b === undefined ? undefined : _b.length); }), {
5135
+ .refine((data) => data.cubes.every((cube) => { var _a, _b; return ((_a = cube.dimensions) === null || _a === void 0 ? void 0 : _a.length) || ((_b = cube.measures) === null || _b === void 0 ? void 0 : _b.length); }), {
5141
5136
  message: "At least one measure or dimension must be defined",
5142
5137
  path: ["cubes"],
5143
5138
  });
@@ -5214,25 +5209,25 @@ function getAugmentedNamespace(n) {
5214
5209
  return a;
5215
5210
  }
5216
5211
 
5217
- var name = "rollbar";
5218
- var version = "2.26.4";
5219
- var repository = {
5212
+ var name$1 = "rollbar";
5213
+ var version$1 = "2.26.4";
5214
+ var repository$1 = {
5220
5215
  type: "git",
5221
5216
  url: "http://github.com/rollbar/rollbar.js"
5222
5217
  };
5223
- var description = "Effortlessly track and debug errors in your JavaScript applications with Rollbar. This package includes advanced error tracking features and an intuitive interface to help you identify and fix issues more quickly.";
5224
- var keywords = [
5218
+ var description$1 = "Effortlessly track and debug errors in your JavaScript applications with Rollbar. This package includes advanced error tracking features and an intuitive interface to help you identify and fix issues more quickly.";
5219
+ var keywords$1 = [
5225
5220
  "error",
5226
5221
  "tracking",
5227
5222
  "logging",
5228
5223
  "debugging",
5229
5224
  "javascript"
5230
5225
  ];
5231
- var license = "MIT";
5232
- var main = "src/server/rollbar.js";
5226
+ var license$1 = "MIT";
5227
+ var main$1 = "src/server/rollbar.js";
5233
5228
  var browser = "dist/rollbar.umd.min.js";
5234
- var types = "./index.d.ts";
5235
- var dependencies = {
5229
+ var types$1 = "./index.d.ts";
5230
+ var dependencies$1 = {
5236
5231
  async: "~3.2.3",
5237
5232
  "console-polyfill": "0.3.0",
5238
5233
  "error-stack-parser": "^2.0.4",
@@ -5241,7 +5236,7 @@ var dependencies = {
5241
5236
  "request-ip": "~3.3.0",
5242
5237
  "source-map": "^0.5.7"
5243
5238
  };
5244
- var devDependencies = {
5239
+ var devDependencies$1 = {
5245
5240
  "@babel/core": "^7.22.11",
5246
5241
  "babel-eslint": "^10.0.3",
5247
5242
  "babel-loader": "^8.0.4",
@@ -5301,7 +5296,7 @@ var devDependencies = {
5301
5296
  var optionalDependencies = {
5302
5297
  decache: "^3.0.5"
5303
5298
  };
5304
- var scripts = {
5299
+ var scripts$1 = {
5305
5300
  build: "./node_modules/.bin/grunt",
5306
5301
  test: "./node_modules/.bin/grunt test",
5307
5302
  "test-browser": "./node_modules/.bin/grunt test-browser",
@@ -5375,19 +5370,19 @@ var plugins = {
5375
5370
  }
5376
5371
  };
5377
5372
  var require$$2 = {
5378
- name: name,
5379
- version: version,
5380
- repository: repository,
5381
- description: description,
5382
- keywords: keywords,
5383
- license: license,
5384
- main: main,
5373
+ name: name$1,
5374
+ version: version$1,
5375
+ repository: repository$1,
5376
+ description: description$1,
5377
+ keywords: keywords$1,
5378
+ license: license$1,
5379
+ main: main$1,
5385
5380
  browser: browser,
5386
- types: types,
5387
- dependencies: dependencies,
5388
- devDependencies: devDependencies,
5381
+ types: types$1,
5382
+ dependencies: dependencies$1,
5383
+ devDependencies: devDependencies$1,
5389
5384
  optionalDependencies: optionalDependencies,
5390
- scripts: scripts,
5385
+ scripts: scripts$1,
5391
5386
  cdn: cdn,
5392
5387
  defaults: defaults,
5393
5388
  plugins: plugins
@@ -17914,7 +17909,7 @@ function requireStackTrace () {
17914
17909
  hasRequiredStackTrace = 1;
17915
17910
  var SourceMapConsumer = requireSourceMap().SourceMapConsumer;
17916
17911
  var path = path__default$1;
17917
- var fs = require$$2$1;
17912
+ var fs = require$$2__default;
17918
17913
 
17919
17914
  /**
17920
17915
  * Uses Node source-map to map transpiled JS stack locations to original
@@ -18122,7 +18117,7 @@ function requireParser () {
18122
18117
 
18123
18118
  var logger = requireLogger();
18124
18119
  var async = require$$0;
18125
- var fs = require$$2$1;
18120
+ var fs = require$$2__default;
18126
18121
  var lru = requireLruCache();
18127
18122
  var util = require$$4$1;
18128
18123
  var stackTrace = requireStackTrace();
@@ -21377,13 +21372,13 @@ var build = async () => {
21377
21372
  }
21378
21373
  };
21379
21374
 
21380
- const oraP = import('ora');
21375
+ const oraP$2 = import('ora');
21381
21376
  const openP = import('open');
21382
21377
  var login = async () => {
21383
21378
  var _a;
21384
21379
  await initLogger("login");
21385
21380
  const breadcrumbs = [];
21386
- const ora = (await oraP).default;
21381
+ const ora = (await oraP$2).default;
21387
21382
  const authenticationSpinner = ora("Waiting for code verification...").start();
21388
21383
  try {
21389
21384
  const open = (await openP).default;
@@ -21473,7 +21468,7 @@ async function resolveFiles() {
21473
21468
  }
21474
21469
 
21475
21470
  async function getWorkspaces(ctx, token, workspaceSpinner) {
21476
- var _a, _b, _c;
21471
+ var _a, _b;
21477
21472
  try {
21478
21473
  const response = await axios.get(`${ctx.pushBaseUrl}/workspace`, {
21479
21474
  headers: {
@@ -21483,11 +21478,7 @@ async function getWorkspaces(ctx, token, workspaceSpinner) {
21483
21478
  return (_a = response.data) === null || _a === void 0 ? void 0 : _a.filter((w) => !w.devWorkspace);
21484
21479
  }
21485
21480
  catch (e) {
21486
- if ((_b = ctx.dev) === null || _b === undefined ? undefined : _b.watch) {
21487
- workspaceSpinner.stop();
21488
- throw e;
21489
- }
21490
- if (((_c = e.response) === null || _c === undefined ? undefined : _c.status) === 401) {
21481
+ if (((_b = e.response) === null || _b === void 0 ? void 0 : _b.status) === 401) {
21491
21482
  workspaceSpinner.fail('Unauthorized. Please login using "embeddable login" command.');
21492
21483
  }
21493
21484
  else {
@@ -21525,10 +21516,12 @@ async function selectWorkspace(ora, ctx, token) {
21525
21516
  return selectedWorkspace;
21526
21517
  }
21527
21518
 
21519
+ const oraP$1 = import('ora');
21528
21520
  // grab cube files
21529
21521
  const CUBE_FILES = /^(.*)\.cube\.(ya?ml|js)$/;
21530
21522
  // grab security context and client context files
21531
21523
  const PRESET_FILES = /^(.*)\.(sc|cc)\.ya?ml$/;
21524
+ let ora$1;
21532
21525
  var push = async () => {
21533
21526
  var _a;
21534
21527
  await initLogger("push");
@@ -21542,9 +21535,10 @@ var push = async () => {
21542
21535
  console.error("Build failed or not completed. Please run `embeddable:build` first.");
21543
21536
  process.exit(1);
21544
21537
  }
21538
+ ora$1 = (await oraP$1).default;
21545
21539
  const config = await provideConfig();
21546
21540
  if (process.argv.includes("--api-key") || process.argv.includes("-k")) {
21547
- spinnerPushing = ora("Using API key...").start();
21541
+ spinnerPushing = ora$1("Using API key...").start();
21548
21542
  breadcrumbs.push("push by api key");
21549
21543
  await pushByApiKey(config, spinnerPushing);
21550
21544
  spinnerPushing.succeed("Published using API key");
@@ -21552,11 +21546,11 @@ var push = async () => {
21552
21546
  }
21553
21547
  breadcrumbs.push("push by standard login");
21554
21548
  const token = await verify(config);
21555
- spinnerPushing = ora()
21549
+ spinnerPushing = ora$1()
21556
21550
  .start()
21557
21551
  .info("No API Key provided. Standard login will be used.");
21558
21552
  breadcrumbs.push("select workspace");
21559
- const { workspaceId, name: workspaceName } = await selectWorkspace(ora, config, token);
21553
+ const { workspaceId, name: workspaceName } = await selectWorkspace(ora$1, config, token);
21560
21554
  const workspacePreviewUrl = `${config.previewBaseUrl}/workspace/${workspaceId}`;
21561
21555
  breadcrumbs.push("build archive");
21562
21556
  await buildArchive(config);
@@ -21566,10 +21560,10 @@ var push = async () => {
21566
21560
  spinnerPushing.succeed(`Published to ${workspaceName} using ${workspacePreviewUrl}`);
21567
21561
  }
21568
21562
  catch (error) {
21569
- spinnerPushing === null || spinnerPushing === undefined ? undefined : spinnerPushing.fail("Publishing failed");
21563
+ spinnerPushing === null || spinnerPushing === void 0 ? void 0 : spinnerPushing.fail("Publishing failed");
21570
21564
  await logError({ command: "push", breadcrumbs, error });
21571
21565
  await reportErrorToRollbar(error);
21572
- console.log(((_a = error.response) === null || _a === undefined ? undefined : _a.data) || error);
21566
+ console.log(((_a = error.response) === null || _a === void 0 ? void 0 : _a.data) || error);
21573
21567
  process.exit(1);
21574
21568
  }
21575
21569
  };
@@ -21610,55 +21604,37 @@ async function verify(ctx) {
21610
21604
  return token;
21611
21605
  }
21612
21606
  async function buildArchive(config) {
21613
- const spinnerArchive = ora("Building...").start();
21614
- if (!config.pushModels && !config.pushComponents) {
21615
- spinnerArchive.fail("Cannot push: both pushModels and pushComponents are disabled");
21616
- process.exit(1);
21617
- }
21618
- const filesList = [];
21619
- if (config.pushModels) {
21620
- const cubeFilesList = await findFiles(config.client.modelsSrc || config.client.srcDir, CUBE_FILES);
21621
- const contextFilesList = await findFiles(config.client.presetsSrc || config.client.srcDir, PRESET_FILES);
21622
- filesList.push(...cubeFilesList.map((entry) => [
21623
- path$1.basename(entry[1]),
21624
- entry[1],
21625
- ]), ...contextFilesList.map((entry) => [
21626
- path$1.basename(entry[1]),
21627
- entry[1],
21628
- ]));
21629
- }
21630
- await archive({
21631
- ctx: config,
21632
- filesList,
21633
- isDev: false,
21634
- includeComponents: config.pushComponents,
21635
- });
21607
+ const spinnerArchive = ora$1("Building...").start();
21608
+ const cubeFilesList = await findFiles(config.client.modelsSrc || config.client.srcDir, CUBE_FILES);
21609
+ const contextFilesList = await findFiles(config.client.presetsSrc || config.client.srcDir, PRESET_FILES);
21610
+ // Map the files to include their full filenames
21611
+ const filesList = [...cubeFilesList, ...contextFilesList].map((entry) => [path$1.basename(entry[1]), entry[1]]);
21612
+ await archive(config, filesList);
21636
21613
  return spinnerArchive.succeed("Bundling completed");
21637
21614
  }
21638
- async function archive(args) {
21639
- const { ctx, filesList, isDev, includeComponents } = args;
21615
+ async function archive(ctx, yamlFiles, isDev = false) {
21640
21616
  const output = fs$1.createWriteStream(ctx.client.archiveFile);
21641
- const archive = archiver.create("zip", {
21617
+ const _archiver = archiver.create("zip", {
21642
21618
  zlib: { level: 9 },
21643
21619
  });
21644
- archive.pipe(output);
21645
- if (!isDev && includeComponents) {
21646
- archive.directory(ctx.client.buildDir, false);
21647
- archive.file(ctx.client.globalCss, {
21620
+ _archiver.pipe(output);
21621
+ if (!isDev) {
21622
+ _archiver.directory(ctx.client.buildDir, false);
21623
+ _archiver.file(ctx.client.globalCss, {
21648
21624
  name: "global.css",
21649
21625
  });
21650
21626
  }
21651
- for (const fileData of filesList) {
21652
- archive.file(fileData[1], {
21627
+ for (const fileData of yamlFiles) {
21628
+ _archiver.file(fileData[1], {
21653
21629
  name: fileData[0],
21654
21630
  });
21655
21631
  }
21656
- await archive.finalize();
21632
+ await _archiver.finalize();
21657
21633
  return new Promise((resolve, _reject) => {
21658
21634
  output.on("close", resolve);
21659
21635
  });
21660
21636
  }
21661
- async function sendBuildByApiKey(ctx, { apiKey, email, message, }) {
21637
+ async function sendBuildByApiKey(ctx, { apiKey, email, message }) {
21662
21638
  var _a;
21663
21639
  const { FormData, Blob } = await import('formdata-node');
21664
21640
  const { fileFromPath } = await Promise.resolve().then(function () { return fileFromPath$1; });
@@ -21669,7 +21645,7 @@ async function sendBuildByApiKey(ctx, { apiKey, email, message, }) {
21669
21645
  form.set("metadata", metadataBlob, "metadata.json");
21670
21646
  const response = await uploadFile(form, `${ctx.pushBaseUrl}/api/v1/bundle/upload`, apiKey);
21671
21647
  await fs.rm(ctx.client.archiveFile);
21672
- return { bundleId: (_a = response.data) === null || _a === undefined ? undefined : _a.bundleId, email, message };
21648
+ return { bundleId: (_a = response.data) === null || _a === void 0 ? void 0 : _a.bundleId, email, message };
21673
21649
  }
21674
21650
  async function sendBuild(ctx, { workspaceId, token }) {
21675
21651
  const { FormData } = await import('formdata-node');
@@ -21691,10 +21667,13 @@ async function uploadFile(formData, url, token) {
21691
21667
  });
21692
21668
  }
21693
21669
 
21670
+ const minimist = require("minimist");
21694
21671
  dotenv.config();
21672
+ const oraP = import('ora');
21695
21673
  let wss;
21696
21674
  let changedFiles = [];
21697
21675
  let browserWindow = null;
21676
+ let ora;
21698
21677
  let previewWorkspace;
21699
21678
  const SERVER_PORT = 8926;
21700
21679
  const BUILD_DEV_DIR = ".embeddable-dev-build";
@@ -21704,6 +21683,7 @@ const buildWebComponent = async (config) => {
21704
21683
  };
21705
21684
  const addToGitingore = async () => {
21706
21685
  try {
21686
+ const fs = require("fs").promises;
21707
21687
  const gitignorePath = path$1.resolve(process.cwd(), ".gitignore");
21708
21688
  const gitignoreContent = await fs.readFile(gitignorePath, "utf8");
21709
21689
  if (!gitignoreContent.includes(BUILD_DEV_DIR)) {
@@ -21723,13 +21703,14 @@ const chokidarWatchOptions = {
21723
21703
  },
21724
21704
  };
21725
21705
  var dev = async () => {
21726
- var _a, _b, _c;
21706
+ var _a, _b;
21727
21707
  await initLogger("dev");
21728
21708
  const breadcrumbs = [];
21729
21709
  try {
21730
21710
  breadcrumbs.push("run dev");
21731
21711
  checkNodeVersion();
21732
21712
  addToGitingore();
21713
+ ora = (await oraP).default;
21733
21714
  process.on("warning", (e) => console.warn(e.stack));
21734
21715
  const logger = createNodeLogger();
21735
21716
  const sys = createNodeSys({ process });
@@ -21752,26 +21733,20 @@ var dev = async () => {
21752
21733
  };
21753
21734
  breadcrumbs.push("prepare config");
21754
21735
  await prepare(config);
21736
+ const finalhandler = require("finalhandler");
21737
+ const serveStatic = require("serve-static");
21755
21738
  const serve = serveStatic(config.client.buildDir);
21756
- let workspacePreparation = ora("Preparing workspace...").start();
21739
+ const workspacePreparation = ora("Preparing workspace...").start();
21757
21740
  breadcrumbs.push("get preview workspace");
21758
21741
  try {
21759
21742
  previewWorkspace = await getPreviewWorkspace(workspacePreparation, config);
21760
21743
  }
21761
21744
  catch (e) {
21762
- if (((_a = e.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
21763
- // login and retry
21764
- await login();
21765
- workspacePreparation = ora("Preparing workspace...").start();
21766
- previewWorkspace = await getPreviewWorkspace(workspacePreparation, config);
21767
- }
21768
- else {
21769
- workspacePreparation.fail(((_c = (_b = e.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.errorMessage) || "Unknown error: " + e.message);
21770
- process.exit(1);
21771
- }
21745
+ workspacePreparation.fail(((_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errorMessage) || "Unknown error: " + e.message);
21746
+ process.exit(1);
21772
21747
  }
21773
21748
  workspacePreparation.succeed("Workspace is ready");
21774
- const server = http.createServer(async (request, res) => {
21749
+ const server = http.createServer((request, res) => {
21775
21750
  var _a;
21776
21751
  res.setHeader("Access-Control-Allow-Origin", "*");
21777
21752
  res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
@@ -21786,7 +21761,7 @@ var dev = async () => {
21786
21761
  try {
21787
21762
  if ((_a = request.url) === null || _a === void 0 ? void 0 : _a.endsWith(GLOBAL_CSS)) {
21788
21763
  res.writeHead(200, { "Content-Type": "text/css" });
21789
- res.end(await fs.readFile(config.client.globalCss));
21764
+ res.end(require$$2$1.readFileSync(config.client.globalCss));
21790
21765
  return;
21791
21766
  }
21792
21767
  }
@@ -21850,7 +21825,7 @@ const configureWatcher = async (watcher, ctx) => {
21850
21825
  changedFiles = [];
21851
21826
  }
21852
21827
  if (e.code === "ERROR") {
21853
- sendMessage("componentsBuildError", { error: (_a = e.error) === null || _a === undefined ? undefined : _a.message });
21828
+ sendMessage("componentsBuildError", { error: (_a = e.error) === null || _a === void 0 ? void 0 : _a.message });
21854
21829
  changedFiles = [];
21855
21830
  }
21856
21831
  });
@@ -21919,12 +21894,7 @@ const sendDataModelsAndContextsChanges = async (ctx) => {
21919
21894
  "embeddable-manifest.json",
21920
21895
  path$1.resolve(ctx.client.buildDir, "embeddable-manifest.json"),
21921
21896
  ]);
21922
- await archive({
21923
- ctx,
21924
- filesList,
21925
- isDev: true,
21926
- includeComponents: false,
21927
- });
21897
+ await archive(ctx, filesList, true);
21928
21898
  await sendBuild(ctx, { workspaceId: previewWorkspace, token });
21929
21899
  sending.succeed(`Data models and/or security context synchronized`);
21930
21900
  sendMessage("dataModelsAndOrSecurityContextUpdateSuccess");
@@ -21936,7 +21906,7 @@ const sendDataModelsAndContextsChanges = async (ctx) => {
21936
21906
  const onClose = async (server, sys, watchers, config) => {
21937
21907
  server.close();
21938
21908
  wss.close();
21939
- browserWindow === null || browserWindow === undefined ? undefined : browserWindow.unref();
21909
+ browserWindow === null || browserWindow === void 0 ? void 0 : browserWindow.unref();
21940
21910
  for (const watcher of watchers) {
21941
21911
  if (watcher.close) {
21942
21912
  await watcher.close();
@@ -22014,8 +21984,6 @@ const embeddableConfigSchema = z
22014
21984
  region: z
22015
21985
  .union([z.literal("EU"), z.literal("US"), z.literal("legacy-US")])
22016
21986
  .optional(),
22017
- pushModels: z.boolean().optional(),
22018
- pushComponents: z.boolean().optional(),
22019
21987
  pushBaseUrl: z.string().optional(),
22020
21988
  audienceUrl: z.string().optional(),
22021
21989
  authDomain: z.string().optional(),
@@ -22051,9 +22019,11 @@ var defineConfig = (config) => {
22051
22019
  if (errors.length > 0) {
22052
22020
  throw new Error(`Invalid Embeddable Configuration: ${errors.join("\n")}}`);
22053
22021
  }
22054
- let { plugins, region = "legacy-US", pushModels = true, pushComponents = true, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", presetsSrc = "src", componentsSrc = "src", globalCss = "src/global.css", viteConfig = {}, rollupOptions = {}, } = config;
22022
+ let { plugins, region = "legacy-US", pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", presetsSrc = "src", componentsSrc = "src", globalCss = "src/global.css", viteConfig = {}, rollupOptions = {}, } = config;
22023
+ if (region && !REGION_CONFIGS[region]) {
22024
+ throw new Error(`Unsupported region: ${region}. Supported regions are: ${Object.keys(REGION_CONFIGS).join(", ")}`);
22025
+ }
22055
22026
  const regionConfig = REGION_CONFIGS[region];
22056
- const __dirname = import.meta.dirname;
22057
22027
  const coreRoot = path.resolve(__dirname, "..");
22058
22028
  const clientRoot = process.cwd();
22059
22029
  if (!path.isAbsolute(componentsSrc)) {
@@ -22101,19 +22071,125 @@ var defineConfig = (config) => {
22101
22071
  outputOptions: {
22102
22072
  typesEntryPointFilename: "embeddable-types-entry-point.js",
22103
22073
  },
22104
- pushModels,
22105
- pushComponents,
22106
- pushBaseUrl: pushBaseUrl !== null && pushBaseUrl !== undefined ? pushBaseUrl : regionConfig.pushBaseUrl,
22107
- audienceUrl: audienceUrl !== null && audienceUrl !== undefined ? audienceUrl : regionConfig.audienceUrl,
22108
- previewBaseUrl: previewBaseUrl !== null && previewBaseUrl !== undefined ? previewBaseUrl : regionConfig.previewBaseUrl,
22109
- authDomain: authDomain !== null && authDomain !== undefined ? authDomain : regionConfig.authDomain,
22110
- authClientId: authClientId !== null && authClientId !== undefined ? authClientId : regionConfig.authClientId,
22111
- applicationEnvironment: applicationEnvironment !== null && applicationEnvironment !== undefined ? applicationEnvironment : "production",
22112
- rollbarAccessToken: rollbarAccessToken !== null && rollbarAccessToken !== undefined ? rollbarAccessToken : "5c6028038d844bf1835a0f4db5f55d9e",
22074
+ pushBaseUrl: pushBaseUrl !== null && pushBaseUrl !== void 0 ? pushBaseUrl : regionConfig.pushBaseUrl,
22075
+ audienceUrl: audienceUrl !== null && audienceUrl !== void 0 ? audienceUrl : regionConfig.audienceUrl,
22076
+ previewBaseUrl: previewBaseUrl !== null && previewBaseUrl !== void 0 ? previewBaseUrl : regionConfig.previewBaseUrl,
22077
+ authDomain: authDomain !== null && authDomain !== void 0 ? authDomain : regionConfig.authDomain,
22078
+ authClientId: authClientId !== null && authClientId !== void 0 ? authClientId : regionConfig.authClientId,
22079
+ applicationEnvironment: applicationEnvironment !== null && applicationEnvironment !== void 0 ? applicationEnvironment : "production",
22080
+ rollbarAccessToken: rollbarAccessToken !== null && rollbarAccessToken !== void 0 ? rollbarAccessToken : "5c6028038d844bf1835a0f4db5f55d9e",
22113
22081
  plugins,
22114
22082
  };
22115
22083
  };
22116
22084
 
22085
+ var name = "@embeddable.com/sdk-core";
22086
+ var version = "3.12.4-next.1";
22087
+ var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
22088
+ var keywords = [
22089
+ "embeddable",
22090
+ "sdk",
22091
+ "web-components"
22092
+ ];
22093
+ var main = "lib/index.js";
22094
+ var module = "lib/index.esm.js";
22095
+ var types = "lib/index.d.ts";
22096
+ var repository = {
22097
+ type: "git",
22098
+ url: "git+https://github.com/embeddable-hq/embeddable-sdk.git",
22099
+ directory: "packages/core-sdk"
22100
+ };
22101
+ var scripts = {
22102
+ build: "rollup -c",
22103
+ test: "vitest run",
22104
+ "test:watch": "vitest",
22105
+ "license-report": "license-report --output=csv --csvHeaders --fields name --fields link --fields licenseType --fields installedVersion --fields author > license-report-sdk-core-sdk.csv"
22106
+ };
22107
+ var author = "Embeddable.com <engineering@embeddable.com>";
22108
+ var files = [
22109
+ "bin/",
22110
+ "src/",
22111
+ "lib/",
22112
+ "loader/",
22113
+ "templates/",
22114
+ "configs/"
22115
+ ];
22116
+ var bin = {
22117
+ embeddable: "bin/embeddable"
22118
+ };
22119
+ var engines = {
22120
+ node: ">=20.0.0"
22121
+ };
22122
+ var license = "MIT";
22123
+ var dependencies = {
22124
+ "@embeddable.com/sdk-utils": "0.6.2-next.0",
22125
+ "@inquirer/prompts": "^7.2.1",
22126
+ "@stencil/core": "^4.23.0",
22127
+ "@swc-node/register": "^1.10.9",
22128
+ archiver: "^5.3.2",
22129
+ axios: "^1.7.9",
22130
+ chokidar: "^4.0.3",
22131
+ dotenv: "^16.4.7",
22132
+ "fast-glob": "^3.3.2",
22133
+ finalhandler: "^1.3.1",
22134
+ "formdata-node": "^6.0.3",
22135
+ minimist: "^1.2.8",
22136
+ open: "^9.1.0",
22137
+ ora: "^8.1.1",
22138
+ "serve-static": "^1.16.2",
22139
+ sorcery: "^0.11.1",
22140
+ vite: "^5.4.11",
22141
+ ws: "^8.18.0",
22142
+ yaml: "^2.6.1"
22143
+ };
22144
+ var devDependencies = {
22145
+ "@types/archiver": "^5.3.4",
22146
+ "@types/ws": "^8.5.13"
22147
+ };
22148
+ var _package = {
22149
+ name: name,
22150
+ version: version,
22151
+ description: description,
22152
+ keywords: keywords,
22153
+ main: main,
22154
+ module: module,
22155
+ types: types,
22156
+ repository: repository,
22157
+ scripts: scripts,
22158
+ author: author,
22159
+ files: files,
22160
+ bin: bin,
22161
+ engines: engines,
22162
+ license: license,
22163
+ dependencies: dependencies,
22164
+ "lint-staged": {
22165
+ "*.{js,ts,json}": [
22166
+ "prettier --write"
22167
+ ]
22168
+ },
22169
+ devDependencies: devDependencies
22170
+ };
22171
+
22172
+ var _package$1 = /*#__PURE__*/Object.freeze({
22173
+ __proto__: null,
22174
+ author: author,
22175
+ bin: bin,
22176
+ default: _package,
22177
+ dependencies: dependencies,
22178
+ description: description,
22179
+ devDependencies: devDependencies,
22180
+ engines: engines,
22181
+ files: files,
22182
+ keywords: keywords,
22183
+ license: license,
22184
+ main: main,
22185
+ module: module,
22186
+ name: name,
22187
+ repository: repository,
22188
+ scripts: scripts,
22189
+ types: types,
22190
+ version: version
22191
+ });
22192
+
22117
22193
  var __accessCheck = (obj, member, msg) => {
22118
22194
  if (!member.has(obj))
22119
22195
  throw TypeError("Cannot " + msg);
@@ -22297,7 +22373,7 @@ var _Blob = class _Blob {
22297
22373
  __privateSet(this, _size, __privateGet(this, _size) + (ArrayBuffer.isView(part) ? part.byteLength : part.size));
22298
22374
  __privateGet(this, _parts).push(part);
22299
22375
  }
22300
- const type = options.type === undefined ? "" : String(options.type);
22376
+ const type = options.type === void 0 ? "" : String(options.type);
22301
22377
  __privateSet(this, _type, /^[\x20-\x7E]*$/.test(type) ? type : "");
22302
22378
  }
22303
22379
  static [Symbol.hasInstance](value) {
@@ -22403,7 +22479,7 @@ var File = class extends Blob {
22403
22479
  /**
22404
22480
  * Returns the name of the file referenced by the File object.
22405
22481
  */
22406
- __privateAdd(this, _name, undefined);
22482
+ __privateAdd(this, _name, void 0);
22407
22483
  /**
22408
22484
  * The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
22409
22485
  */
@@ -22414,7 +22490,7 @@ var File = class extends Blob {
22414
22490
  );
22415
22491
  }
22416
22492
  __privateSet(this, _name, String(name));
22417
- const lastModified = options.lastModified === undefined ? Date.now() : Number(options.lastModified);
22493
+ const lastModified = options.lastModified === void 0 ? Date.now() : Number(options.lastModified);
22418
22494
  if (!Number.isNaN(lastModified)) {
22419
22495
  __privateSet(this, _lastModified, lastModified);
22420
22496
  }
@@ -22449,8 +22525,8 @@ _lastModified = new WeakMap();
22449
22525
  var _path, _start;
22450
22526
  var _FileFromPath = class _FileFromPath {
22451
22527
  constructor(input) {
22452
- __privateAdd(this, _path, undefined);
22453
- __privateAdd(this, _start, undefined);
22528
+ __privateAdd(this, _path, void 0);
22529
+ __privateAdd(this, _start, void 0);
22454
22530
  __privateSet(this, _path, input.path);
22455
22531
  __privateSet(this, _start, input.start || 0);
22456
22532
  this.name = basename(__privateGet(this, _path));
@@ -22490,7 +22566,7 @@ var FileFromPath = _FileFromPath;
22490
22566
  function createFileFromPath(path, { mtimeMs, size }, filenameOrOptions, options = {}) {
22491
22567
  let filename;
22492
22568
  if (isObject(filenameOrOptions)) {
22493
- [options, filename] = [filenameOrOptions, undefined];
22569
+ [options, filename] = [filenameOrOptions, void 0];
22494
22570
  } else {
22495
22571
  filename = filenameOrOptions;
22496
22572
  }