@embeddable.com/sdk-core 3.12.6 → 3.13.0-next.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.
Files changed (48) hide show
  1. package/lib/index.esm.js +114 -240
  2. package/lib/index.esm.js.map +1 -1
  3. package/loader/custom-esm-loader.mjs +16 -11
  4. package/loader/entryPoint.js +1 -1
  5. package/loader/entryPoint.test.js +1 -1
  6. package/package.json +10 -6
  7. package/src/build.test.ts +4 -0
  8. package/src/build.ts +0 -1
  9. package/src/buildTypes.ts +1 -3
  10. package/src/cleanup.test.ts +1 -0
  11. package/src/cleanup.ts +1 -0
  12. package/src/defineConfig.ts +2 -0
  13. package/src/dev.test.ts +7 -1
  14. package/src/dev.ts +7 -14
  15. package/src/generate.ts +1 -1
  16. package/src/logger.test.ts +16 -4
  17. package/src/login.test.ts +2 -2
  18. package/src/push.test.ts +30 -9
  19. package/src/push.ts +8 -11
  20. package/src/types.d.ts +3 -0
  21. package/src/utils.test.ts +24 -5
  22. package/src/utils.ts +13 -3
  23. package/src/validate.test.ts +5 -0
  24. package/src/validate.ts +1 -1
  25. package/lib/index.js +0 -22612
  26. package/lib/index.js.map +0 -1
  27. package/lib/src/build.d.ts +0 -2
  28. package/lib/src/build.test.d.ts +0 -1
  29. package/lib/src/buildTypes.d.ts +0 -4
  30. package/lib/src/buildTypes.test.d.ts +0 -1
  31. package/lib/src/cleanup.d.ts +0 -16
  32. package/lib/src/cleanup.test.d.ts +0 -1
  33. package/lib/src/createContext.d.ts +0 -23
  34. package/lib/src/credentials.d.ts +0 -2
  35. package/lib/src/defineConfig.d.ts +0 -65
  36. package/lib/src/dev.d.ts +0 -2
  37. package/lib/src/generate.d.ts +0 -2
  38. package/lib/src/globalCleanup.d.ts +0 -2
  39. package/lib/src/index.d.ts +0 -5
  40. package/lib/src/login.d.ts +0 -4
  41. package/lib/src/prepare.d.ts +0 -3
  42. package/lib/src/provideConfig.d.ts +0 -2
  43. package/lib/src/provideConfig.test.d.ts +0 -1
  44. package/lib/src/push.d.ts +0 -26
  45. package/lib/src/utils.d.ts +0 -25
  46. package/lib/src/utils.test.d.ts +0 -1
  47. package/lib/src/validate.d.ts +0 -8
  48. package/lib/src/validate.test.d.ts +0 -1
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;
@@ -21478,11 +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 = ctx.dev) === null || _b === void 0 ? void 0 : _b.watch) {
21486
+ if ((_b = ctx.dev) === null || _b === undefined ? undefined : _b.watch) {
21482
21487
  workspaceSpinner.stop();
21483
21488
  throw e;
21484
21489
  }
21485
- if (((_c = e.response) === null || _c === void 0 ? void 0 : _c.status) === 401) {
21490
+ if (((_c = e.response) === null || _c === undefined ? undefined : _c.status) === 401) {
21486
21491
  workspaceSpinner.fail('Unauthorized. Please login using "embeddable login" command.');
21487
21492
  }
21488
21493
  else {
@@ -21520,12 +21525,10 @@ async function selectWorkspace(ora, ctx, token) {
21520
21525
  return selectedWorkspace;
21521
21526
  }
21522
21527
 
21523
- const oraP$1 = import('ora');
21524
21528
  // grab cube files
21525
21529
  const CUBE_FILES = /^(.*)\.cube\.(ya?ml|js)$/;
21526
21530
  // grab security context and client context files
21527
21531
  const PRESET_FILES = /^(.*)\.(sc|cc)\.ya?ml$/;
21528
- let ora$1;
21529
21532
  var push = async () => {
21530
21533
  var _a;
21531
21534
  await initLogger("push");
@@ -21539,10 +21542,9 @@ var push = async () => {
21539
21542
  console.error("Build failed or not completed. Please run `embeddable:build` first.");
21540
21543
  process.exit(1);
21541
21544
  }
21542
- ora$1 = (await oraP$1).default;
21543
21545
  const config = await provideConfig();
21544
21546
  if (process.argv.includes("--api-key") || process.argv.includes("-k")) {
21545
- spinnerPushing = ora$1("Using API key...").start();
21547
+ spinnerPushing = ora("Using API key...").start();
21546
21548
  breadcrumbs.push("push by api key");
21547
21549
  await pushByApiKey(config, spinnerPushing);
21548
21550
  spinnerPushing.succeed("Published using API key");
@@ -21550,11 +21552,11 @@ var push = async () => {
21550
21552
  }
21551
21553
  breadcrumbs.push("push by standard login");
21552
21554
  const token = await verify(config);
21553
- spinnerPushing = ora$1()
21555
+ spinnerPushing = ora()
21554
21556
  .start()
21555
21557
  .info("No API Key provided. Standard login will be used.");
21556
21558
  breadcrumbs.push("select workspace");
21557
- const { workspaceId, name: workspaceName } = await selectWorkspace(ora$1, config, token);
21559
+ const { workspaceId, name: workspaceName } = await selectWorkspace(ora, config, token);
21558
21560
  const workspacePreviewUrl = `${config.previewBaseUrl}/workspace/${workspaceId}`;
21559
21561
  breadcrumbs.push("build archive");
21560
21562
  await buildArchive(config);
@@ -21564,10 +21566,10 @@ var push = async () => {
21564
21566
  spinnerPushing.succeed(`Published to ${workspaceName} using ${workspacePreviewUrl}`);
21565
21567
  }
21566
21568
  catch (error) {
21567
- spinnerPushing === null || spinnerPushing === void 0 ? void 0 : spinnerPushing.fail("Publishing failed");
21569
+ spinnerPushing === null || spinnerPushing === undefined ? undefined : spinnerPushing.fail("Publishing failed");
21568
21570
  await logError({ command: "push", breadcrumbs, error });
21569
21571
  await reportErrorToRollbar(error);
21570
- 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);
21571
21573
  process.exit(1);
21572
21574
  }
21573
21575
  };
@@ -21608,7 +21610,7 @@ async function verify(ctx) {
21608
21610
  return token;
21609
21611
  }
21610
21612
  async function buildArchive(config) {
21611
- const spinnerArchive = ora$1("Building...").start();
21613
+ const spinnerArchive = ora("Building...").start();
21612
21614
  const cubeFilesList = await findFiles(config.client.modelsSrc || config.client.srcDir, CUBE_FILES);
21613
21615
  const contextFilesList = await findFiles(config.client.presetsSrc || config.client.srcDir, PRESET_FILES);
21614
21616
  // Map the files to include their full filenames
@@ -21618,22 +21620,22 @@ async function buildArchive(config) {
21618
21620
  }
21619
21621
  async function archive(ctx, yamlFiles, isDev = false) {
21620
21622
  const output = fs$1.createWriteStream(ctx.client.archiveFile);
21621
- const _archiver = archiver.create("zip", {
21623
+ const archive = archiver.create("zip", {
21622
21624
  zlib: { level: 9 },
21623
21625
  });
21624
- _archiver.pipe(output);
21626
+ archive.pipe(output);
21625
21627
  if (!isDev) {
21626
- _archiver.directory(ctx.client.buildDir, false);
21627
- _archiver.file(ctx.client.globalCss, {
21628
+ archive.directory(ctx.client.buildDir, false);
21629
+ archive.file(ctx.client.globalCss, {
21628
21630
  name: "global.css",
21629
21631
  });
21630
21632
  }
21631
21633
  for (const fileData of yamlFiles) {
21632
- _archiver.file(fileData[1], {
21634
+ archive.file(fileData[1], {
21633
21635
  name: fileData[0],
21634
21636
  });
21635
21637
  }
21636
- await _archiver.finalize();
21638
+ await archive.finalize();
21637
21639
  return new Promise((resolve, _reject) => {
21638
21640
  output.on("close", resolve);
21639
21641
  });
@@ -21649,7 +21651,7 @@ async function sendBuildByApiKey(ctx, { apiKey, email, message }) {
21649
21651
  form.set("metadata", metadataBlob, "metadata.json");
21650
21652
  const response = await uploadFile(form, `${ctx.pushBaseUrl}/api/v1/bundle/upload`, apiKey);
21651
21653
  await fs.rm(ctx.client.archiveFile);
21652
- return { bundleId: (_a = response.data) === null || _a === void 0 ? void 0 : _a.bundleId, email, message };
21654
+ return { bundleId: (_a = response.data) === null || _a === undefined ? undefined : _a.bundleId, email, message };
21653
21655
  }
21654
21656
  async function sendBuild(ctx, { workspaceId, token }) {
21655
21657
  const { FormData } = await import('formdata-node');
@@ -21671,13 +21673,10 @@ async function uploadFile(formData, url, token) {
21671
21673
  });
21672
21674
  }
21673
21675
 
21674
- const minimist = require("minimist");
21675
21676
  dotenv.config();
21676
- const oraP = import('ora');
21677
21677
  let wss;
21678
21678
  let changedFiles = [];
21679
21679
  let browserWindow = null;
21680
- let ora;
21681
21680
  let previewWorkspace;
21682
21681
  const SERVER_PORT = 8926;
21683
21682
  const BUILD_DEV_DIR = ".embeddable-dev-build";
@@ -21687,7 +21686,6 @@ const buildWebComponent = async (config) => {
21687
21686
  };
21688
21687
  const addToGitingore = async () => {
21689
21688
  try {
21690
- const fs = require("fs").promises;
21691
21689
  const gitignorePath = path$1.resolve(process.cwd(), ".gitignore");
21692
21690
  const gitignoreContent = await fs.readFile(gitignorePath, "utf8");
21693
21691
  if (!gitignoreContent.includes(BUILD_DEV_DIR)) {
@@ -21714,7 +21712,6 @@ var dev = async () => {
21714
21712
  breadcrumbs.push("run dev");
21715
21713
  checkNodeVersion();
21716
21714
  addToGitingore();
21717
- ora = (await oraP).default;
21718
21715
  process.on("warning", (e) => console.warn(e.stack));
21719
21716
  const logger = createNodeLogger();
21720
21717
  const sys = createNodeSys({ process });
@@ -21737,8 +21734,6 @@ var dev = async () => {
21737
21734
  };
21738
21735
  breadcrumbs.push("prepare config");
21739
21736
  await prepare(config);
21740
- const finalhandler = require("finalhandler");
21741
- const serveStatic = require("serve-static");
21742
21737
  const serve = serveStatic(config.client.buildDir);
21743
21738
  let workspacePreparation = ora("Preparing workspace...").start();
21744
21739
  breadcrumbs.push("get preview workspace");
@@ -21758,12 +21753,13 @@ var dev = async () => {
21758
21753
  }
21759
21754
  }
21760
21755
  workspacePreparation.succeed("Workspace is ready");
21761
- const server = http.createServer((request, res) => {
21756
+ const server = http.createServer(async (request, res) => {
21762
21757
  var _a;
21763
21758
  res.setHeader("Access-Control-Allow-Origin", "*");
21764
21759
  res.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
21765
21760
  res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization");
21766
21761
  if (request.method === "OPTIONS") {
21762
+ // Respond to OPTIONS requests with just the CORS headers and a 200 status code
21767
21763
  res.writeHead(200);
21768
21764
  res.end();
21769
21765
  return;
@@ -21772,7 +21768,7 @@ var dev = async () => {
21772
21768
  try {
21773
21769
  if ((_a = request.url) === null || _a === void 0 ? void 0 : _a.endsWith(GLOBAL_CSS)) {
21774
21770
  res.writeHead(200, { "Content-Type": "text/css" });
21775
- res.end(require$$2$1.readFileSync(config.client.globalCss));
21771
+ res.end(await fs.readFile(config.client.globalCss));
21776
21772
  return;
21777
21773
  }
21778
21774
  }
@@ -21780,21 +21776,7 @@ var dev = async () => {
21780
21776
  serve(request, res, done);
21781
21777
  });
21782
21778
  wss = new WebSocketServer({ server });
21783
- wss.on("connection", (ws) => {
21784
- console.log("🔌 New WebSocket connection established");
21785
- ws.on("error", (error) => {
21786
- console.error("WebSocket error:", error);
21787
- });
21788
- ws.on("close", () => {
21789
- console.log("WebSocket connection closed");
21790
- });
21791
- });
21792
- wss.on("error", (error) => {
21793
- console.error("WebSocket server error:", error);
21794
- });
21795
21779
  server.listen(SERVER_PORT, async () => {
21796
- console.log(`\n�� Dev server running and ready to connect`);
21797
- console.log("ℹ️ Your app will automatically connect to the dev server when you open the workspace");
21798
21780
  const watchers = [];
21799
21781
  if (sys === null || sys === void 0 ? void 0 : sys.onProcessInterrupt) {
21800
21782
  sys.onProcessInterrupt(async () => await onClose(server, sys, watchers, config));
@@ -21850,7 +21832,7 @@ const configureWatcher = async (watcher, ctx) => {
21850
21832
  changedFiles = [];
21851
21833
  }
21852
21834
  if (e.code === "ERROR") {
21853
- sendMessage("componentsBuildError", { error: (_a = e.error) === null || _a === void 0 ? void 0 : _a.message });
21835
+ sendMessage("componentsBuildError", { error: (_a = e.error) === null || _a === undefined ? undefined : _a.message });
21854
21836
  changedFiles = [];
21855
21837
  }
21856
21838
  });
@@ -21931,7 +21913,7 @@ const sendDataModelsAndContextsChanges = async (ctx) => {
21931
21913
  const onClose = async (server, sys, watchers, config) => {
21932
21914
  server.close();
21933
21915
  wss.close();
21934
- browserWindow === null || browserWindow === void 0 ? void 0 : browserWindow.unref();
21916
+ browserWindow === null || browserWindow === undefined ? undefined : browserWindow.unref();
21935
21917
  for (const watcher of watchers) {
21936
21918
  if (watcher.close) {
21937
21919
  await watcher.close();
@@ -22008,6 +21990,7 @@ var defineConfig = ({ plugins, region = "legacy-US", pushBaseUrl, audienceUrl, a
22008
21990
  throw new Error(`Unsupported region: ${region}. Supported regions are: ${Object.keys(REGION_CONFIGS).join(", ")}`);
22009
21991
  }
22010
21992
  const regionConfig = REGION_CONFIGS[region];
21993
+ const __dirname = import.meta.dirname;
22011
21994
  const coreRoot = path.resolve(__dirname, "..");
22012
21995
  const clientRoot = process.cwd();
22013
21996
  if (!path.isAbsolute(componentsSrc)) {
@@ -22055,126 +22038,17 @@ var defineConfig = ({ plugins, region = "legacy-US", pushBaseUrl, audienceUrl, a
22055
22038
  outputOptions: {
22056
22039
  typesEntryPointFilename: "embeddable-types-entry-point.js",
22057
22040
  },
22058
- pushBaseUrl: pushBaseUrl !== null && pushBaseUrl !== void 0 ? pushBaseUrl : regionConfig.pushBaseUrl,
22059
- audienceUrl: audienceUrl !== null && audienceUrl !== void 0 ? audienceUrl : regionConfig.audienceUrl,
22060
- previewBaseUrl: previewBaseUrl !== null && previewBaseUrl !== void 0 ? previewBaseUrl : regionConfig.previewBaseUrl,
22061
- authDomain: authDomain !== null && authDomain !== void 0 ? authDomain : regionConfig.authDomain,
22062
- authClientId: authClientId !== null && authClientId !== void 0 ? authClientId : regionConfig.authClientId,
22063
- applicationEnvironment: applicationEnvironment !== null && applicationEnvironment !== void 0 ? applicationEnvironment : "production",
22064
- rollbarAccessToken: rollbarAccessToken !== null && rollbarAccessToken !== void 0 ? rollbarAccessToken : "5c6028038d844bf1835a0f4db5f55d9e",
22041
+ pushBaseUrl: pushBaseUrl !== null && pushBaseUrl !== undefined ? pushBaseUrl : regionConfig.pushBaseUrl,
22042
+ audienceUrl: audienceUrl !== null && audienceUrl !== undefined ? audienceUrl : regionConfig.audienceUrl,
22043
+ previewBaseUrl: previewBaseUrl !== null && previewBaseUrl !== undefined ? previewBaseUrl : regionConfig.previewBaseUrl,
22044
+ authDomain: authDomain !== null && authDomain !== undefined ? authDomain : regionConfig.authDomain,
22045
+ authClientId: authClientId !== null && authClientId !== undefined ? authClientId : regionConfig.authClientId,
22046
+ applicationEnvironment: applicationEnvironment !== null && applicationEnvironment !== undefined ? applicationEnvironment : "production",
22047
+ rollbarAccessToken: rollbarAccessToken !== null && rollbarAccessToken !== undefined ? rollbarAccessToken : "5c6028038d844bf1835a0f4db5f55d9e",
22065
22048
  plugins,
22066
22049
  };
22067
22050
  };
22068
22051
 
22069
- var name = "@embeddable.com/sdk-core";
22070
- var version = "3.12.4";
22071
- var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
22072
- var keywords = [
22073
- "embeddable",
22074
- "sdk",
22075
- "web-components"
22076
- ];
22077
- var main = "lib/index.js";
22078
- var module = "lib/index.esm.js";
22079
- var types = "lib/index.d.ts";
22080
- var repository = {
22081
- type: "git",
22082
- url: "git+https://github.com/embeddable-hq/embeddable-sdk.git",
22083
- directory: "packages/core-sdk"
22084
- };
22085
- var scripts = {
22086
- build: "rollup -c",
22087
- test: "vitest run",
22088
- "test:watch": "vitest",
22089
- "license-report": "license-report --output=csv --csvHeaders --fields name --fields link --fields licenseType --fields installedVersion --fields author > license-report-sdk-core-sdk.csv"
22090
- };
22091
- var author = "Embeddable.com <engineering@embeddable.com>";
22092
- var files = [
22093
- "bin/",
22094
- "src/",
22095
- "lib/",
22096
- "loader/",
22097
- "templates/",
22098
- "configs/",
22099
- "certs"
22100
- ];
22101
- var bin = {
22102
- embeddable: "bin/embeddable"
22103
- };
22104
- var engines = {
22105
- node: ">=20.0.0"
22106
- };
22107
- var license = "MIT";
22108
- var dependencies = {
22109
- "@embeddable.com/sdk-utils": "0.6.2",
22110
- "@inquirer/prompts": "^7.2.1",
22111
- "@stencil/core": "^4.23.0",
22112
- "@swc-node/register": "^1.10.9",
22113
- archiver: "^5.3.2",
22114
- axios: "^1.7.9",
22115
- chokidar: "^4.0.3",
22116
- dotenv: "^16.4.7",
22117
- "fast-glob": "^3.3.2",
22118
- finalhandler: "^1.3.1",
22119
- "formdata-node": "^6.0.3",
22120
- minimist: "^1.2.8",
22121
- open: "^9.1.0",
22122
- ora: "^8.1.1",
22123
- "serve-static": "^1.16.2",
22124
- sorcery: "^0.11.1",
22125
- vite: "^5.4.11",
22126
- ws: "^8.18.0",
22127
- yaml: "^2.6.1"
22128
- };
22129
- var devDependencies = {
22130
- "@types/archiver": "^5.3.4",
22131
- "@types/ws": "^8.5.13"
22132
- };
22133
- var _package = {
22134
- name: name,
22135
- version: version,
22136
- description: description,
22137
- keywords: keywords,
22138
- main: main,
22139
- module: module,
22140
- types: types,
22141
- repository: repository,
22142
- scripts: scripts,
22143
- author: author,
22144
- files: files,
22145
- bin: bin,
22146
- engines: engines,
22147
- license: license,
22148
- dependencies: dependencies,
22149
- "lint-staged": {
22150
- "*.{js,ts,json}": [
22151
- "prettier --write"
22152
- ]
22153
- },
22154
- devDependencies: devDependencies
22155
- };
22156
-
22157
- var _package$1 = /*#__PURE__*/Object.freeze({
22158
- __proto__: null,
22159
- author: author,
22160
- bin: bin,
22161
- default: _package,
22162
- dependencies: dependencies,
22163
- description: description,
22164
- devDependencies: devDependencies,
22165
- engines: engines,
22166
- files: files,
22167
- keywords: keywords,
22168
- license: license,
22169
- main: main,
22170
- module: module,
22171
- name: name,
22172
- repository: repository,
22173
- scripts: scripts,
22174
- types: types,
22175
- version: version
22176
- });
22177
-
22178
22052
  var __accessCheck = (obj, member, msg) => {
22179
22053
  if (!member.has(obj))
22180
22054
  throw TypeError("Cannot " + msg);
@@ -22358,7 +22232,7 @@ var _Blob = class _Blob {
22358
22232
  __privateSet(this, _size, __privateGet(this, _size) + (ArrayBuffer.isView(part) ? part.byteLength : part.size));
22359
22233
  __privateGet(this, _parts).push(part);
22360
22234
  }
22361
- const type = options.type === void 0 ? "" : String(options.type);
22235
+ const type = options.type === undefined ? "" : String(options.type);
22362
22236
  __privateSet(this, _type, /^[\x20-\x7E]*$/.test(type) ? type : "");
22363
22237
  }
22364
22238
  static [Symbol.hasInstance](value) {
@@ -22464,7 +22338,7 @@ var File = class extends Blob {
22464
22338
  /**
22465
22339
  * Returns the name of the file referenced by the File object.
22466
22340
  */
22467
- __privateAdd(this, _name, void 0);
22341
+ __privateAdd(this, _name, undefined);
22468
22342
  /**
22469
22343
  * 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.
22470
22344
  */
@@ -22475,7 +22349,7 @@ var File = class extends Blob {
22475
22349
  );
22476
22350
  }
22477
22351
  __privateSet(this, _name, String(name));
22478
- const lastModified = options.lastModified === void 0 ? Date.now() : Number(options.lastModified);
22352
+ const lastModified = options.lastModified === undefined ? Date.now() : Number(options.lastModified);
22479
22353
  if (!Number.isNaN(lastModified)) {
22480
22354
  __privateSet(this, _lastModified, lastModified);
22481
22355
  }
@@ -22510,8 +22384,8 @@ _lastModified = new WeakMap();
22510
22384
  var _path, _start;
22511
22385
  var _FileFromPath = class _FileFromPath {
22512
22386
  constructor(input) {
22513
- __privateAdd(this, _path, void 0);
22514
- __privateAdd(this, _start, void 0);
22387
+ __privateAdd(this, _path, undefined);
22388
+ __privateAdd(this, _start, undefined);
22515
22389
  __privateSet(this, _path, input.path);
22516
22390
  __privateSet(this, _start, input.start || 0);
22517
22391
  this.name = basename(__privateGet(this, _path));
@@ -22551,7 +22425,7 @@ var FileFromPath = _FileFromPath;
22551
22425
  function createFileFromPath(path, { mtimeMs, size }, filenameOrOptions, options = {}) {
22552
22426
  let filename;
22553
22427
  if (isObject(filenameOrOptions)) {
22554
- [options, filename] = [filenameOrOptions, void 0];
22428
+ [options, filename] = [filenameOrOptions, undefined];
22555
22429
  } else {
22556
22430
  filename = filenameOrOptions;
22557
22431
  }