@embeddable.com/sdk-core 3.13.0 → 3.13.1

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