@seeka-labs/cli-apps-azure 3.9.17 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -180,16 +180,16 @@ var require_util = __commonJS({
180
180
  }
181
181
  exports2.urlGenerate = urlGenerate;
182
182
  function normalize2(aPath) {
183
- var path13 = aPath;
183
+ var path15 = aPath;
184
184
  var url = urlParse(aPath);
185
185
  if (url) {
186
186
  if (!url.path) {
187
187
  return aPath;
188
188
  }
189
- path13 = url.path;
189
+ path15 = url.path;
190
190
  }
191
- var isAbsolute2 = exports2.isAbsolute(path13);
192
- var parts = path13.split(/\/+/);
191
+ var isAbsolute2 = exports2.isAbsolute(path15);
192
+ var parts = path15.split(/\/+/);
193
193
  for (var part, up = 0, i2 = parts.length - 1; i2 >= 0; i2--) {
194
194
  part = parts[i2];
195
195
  if (part === ".") {
@@ -206,18 +206,18 @@ var require_util = __commonJS({
206
206
  }
207
207
  }
208
208
  }
209
- path13 = parts.join("/");
210
- if (path13 === "") {
211
- path13 = isAbsolute2 ? "/" : ".";
209
+ path15 = parts.join("/");
210
+ if (path15 === "") {
211
+ path15 = isAbsolute2 ? "/" : ".";
212
212
  }
213
213
  if (url) {
214
- url.path = path13;
214
+ url.path = path15;
215
215
  return urlGenerate(url);
216
216
  }
217
- return path13;
217
+ return path15;
218
218
  }
219
219
  exports2.normalize = normalize2;
220
- function join8(aRoot, aPath) {
220
+ function join10(aRoot, aPath) {
221
221
  if (aRoot === "") {
222
222
  aRoot = ".";
223
223
  }
@@ -249,7 +249,7 @@ var require_util = __commonJS({
249
249
  }
250
250
  return joined;
251
251
  }
252
- exports2.join = join8;
252
+ exports2.join = join10;
253
253
  exports2.isAbsolute = function(aPath) {
254
254
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
255
255
  };
@@ -422,7 +422,7 @@ var require_util = __commonJS({
422
422
  parsed.path = parsed.path.substring(0, index2 + 1);
423
423
  }
424
424
  }
425
- sourceURL = join8(urlGenerate(parsed), sourceURL);
425
+ sourceURL = join10(urlGenerate(parsed), sourceURL);
426
426
  }
427
427
  return normalize2(sourceURL);
428
428
  }
@@ -1834,12 +1834,12 @@ var require_buffer_from = __commonJS({
1834
1834
  var require_source_map_support = __commonJS({
1835
1835
  "../../node_modules/source-map-support/source-map-support.js"(exports2, module2) {
1836
1836
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
1837
- var path13 = require("path");
1838
- var fs16;
1837
+ var path15 = require("path");
1838
+ var fs18;
1839
1839
  try {
1840
- fs16 = require("fs");
1841
- if (!fs16.existsSync || !fs16.readFileSync) {
1842
- fs16 = null;
1840
+ fs18 = require("fs");
1841
+ if (!fs18.existsSync || !fs18.readFileSync) {
1842
+ fs18 = null;
1843
1843
  }
1844
1844
  } catch (err) {
1845
1845
  }
@@ -1895,26 +1895,26 @@ var require_source_map_support = __commonJS({
1895
1895
  };
1896
1896
  }
1897
1897
  var retrieveFile = handlerExec(retrieveFileHandlers);
1898
- retrieveFileHandlers.push(function(path14) {
1899
- path14 = path14.trim();
1900
- if (/^file:/.test(path14)) {
1901
- path14 = path14.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
1898
+ retrieveFileHandlers.push(function(path16) {
1899
+ path16 = path16.trim();
1900
+ if (/^file:/.test(path16)) {
1901
+ path16 = path16.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
1902
1902
  return drive ? "" : (
1903
1903
  // file:///C:/dir/file -> C:/dir/file
1904
1904
  "/"
1905
1905
  );
1906
1906
  });
1907
1907
  }
1908
- if (path14 in fileContentsCache) {
1909
- return fileContentsCache[path14];
1908
+ if (path16 in fileContentsCache) {
1909
+ return fileContentsCache[path16];
1910
1910
  }
1911
1911
  var contents = "";
1912
1912
  try {
1913
- if (!fs16) {
1913
+ if (!fs18) {
1914
1914
  var xhr = new XMLHttpRequest();
1915
1915
  xhr.open(
1916
1916
  "GET",
1917
- path14,
1917
+ path16,
1918
1918
  /** async */
1919
1919
  false
1920
1920
  );
@@ -1922,24 +1922,24 @@ var require_source_map_support = __commonJS({
1922
1922
  if (xhr.readyState === 4 && xhr.status === 200) {
1923
1923
  contents = xhr.responseText;
1924
1924
  }
1925
- } else if (fs16.existsSync(path14)) {
1926
- contents = fs16.readFileSync(path14, "utf8");
1925
+ } else if (fs18.existsSync(path16)) {
1926
+ contents = fs18.readFileSync(path16, "utf8");
1927
1927
  }
1928
1928
  } catch (er2) {
1929
1929
  }
1930
- return fileContentsCache[path14] = contents;
1930
+ return fileContentsCache[path16] = contents;
1931
1931
  });
1932
1932
  function supportRelativeURL(file, url) {
1933
1933
  if (!file) return url;
1934
- var dir = path13.dirname(file);
1934
+ var dir = path15.dirname(file);
1935
1935
  var match2 = /^\w+:\/\/[^\/]*/.exec(dir);
1936
1936
  var protocol = match2 ? match2[0] : "";
1937
1937
  var startPath = dir.slice(protocol.length);
1938
1938
  if (protocol && /^\/\w\:/.test(startPath)) {
1939
1939
  protocol += "/";
1940
- return protocol + path13.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
1940
+ return protocol + path15.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
1941
1941
  }
1942
- return protocol + path13.resolve(dir.slice(protocol.length), url);
1942
+ return protocol + path15.resolve(dir.slice(protocol.length), url);
1943
1943
  }
1944
1944
  function retrieveSourceMapURL(source) {
1945
1945
  var fileData;
@@ -2187,9 +2187,9 @@ var require_source_map_support = __commonJS({
2187
2187
  var line = +match2[2];
2188
2188
  var column = +match2[3];
2189
2189
  var contents = fileContentsCache[source];
2190
- if (!contents && fs16 && fs16.existsSync(source)) {
2190
+ if (!contents && fs18 && fs18.existsSync(source)) {
2191
2191
  try {
2192
- contents = fs16.readFileSync(source, "utf8");
2192
+ contents = fs18.readFileSync(source, "utf8");
2193
2193
  } catch (er2) {
2194
2194
  contents = "";
2195
2195
  }
@@ -3463,8 +3463,8 @@ var require_command = __commonJS({
3463
3463
  "../../node_modules/commander/lib/command.js"(exports2) {
3464
3464
  var EventEmitter2 = require("node:events").EventEmitter;
3465
3465
  var childProcess4 = require("node:child_process");
3466
- var path13 = require("node:path");
3467
- var fs16 = require("node:fs");
3466
+ var path15 = require("node:path");
3467
+ var fs18 = require("node:fs");
3468
3468
  var process11 = require("node:process");
3469
3469
  var { Argument: Argument2, humanReadableArgName } = require_argument();
3470
3470
  var { CommanderError: CommanderError2 } = require_error();
@@ -4458,7 +4458,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
4458
4458
  * @param {string} subcommandName
4459
4459
  */
4460
4460
  _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
4461
- if (fs16.existsSync(executableFile)) return;
4461
+ if (fs18.existsSync(executableFile)) return;
4462
4462
  const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
4463
4463
  const executableMissing = `'${executableFile}' does not exist
4464
4464
  - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
@@ -4476,11 +4476,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
4476
4476
  let launchWithNode = false;
4477
4477
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
4478
4478
  function findFile(baseDir, baseName) {
4479
- const localBin = path13.resolve(baseDir, baseName);
4480
- if (fs16.existsSync(localBin)) return localBin;
4481
- if (sourceExt.includes(path13.extname(baseName))) return void 0;
4479
+ const localBin = path15.resolve(baseDir, baseName);
4480
+ if (fs18.existsSync(localBin)) return localBin;
4481
+ if (sourceExt.includes(path15.extname(baseName))) return void 0;
4482
4482
  const foundExt = sourceExt.find(
4483
- (ext2) => fs16.existsSync(`${localBin}${ext2}`)
4483
+ (ext2) => fs18.existsSync(`${localBin}${ext2}`)
4484
4484
  );
4485
4485
  if (foundExt) return `${localBin}${foundExt}`;
4486
4486
  return void 0;
@@ -4492,21 +4492,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
4492
4492
  if (this._scriptPath) {
4493
4493
  let resolvedScriptPath;
4494
4494
  try {
4495
- resolvedScriptPath = fs16.realpathSync(this._scriptPath);
4495
+ resolvedScriptPath = fs18.realpathSync(this._scriptPath);
4496
4496
  } catch {
4497
4497
  resolvedScriptPath = this._scriptPath;
4498
4498
  }
4499
- executableDir = path13.resolve(
4500
- path13.dirname(resolvedScriptPath),
4499
+ executableDir = path15.resolve(
4500
+ path15.dirname(resolvedScriptPath),
4501
4501
  executableDir
4502
4502
  );
4503
4503
  }
4504
4504
  if (executableDir) {
4505
4505
  let localFile = findFile(executableDir, executableFile);
4506
4506
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
4507
- const legacyName = path13.basename(
4507
+ const legacyName = path15.basename(
4508
4508
  this._scriptPath,
4509
- path13.extname(this._scriptPath)
4509
+ path15.extname(this._scriptPath)
4510
4510
  );
4511
4511
  if (legacyName !== this._name) {
4512
4512
  localFile = findFile(
@@ -4517,7 +4517,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
4517
4517
  }
4518
4518
  executableFile = localFile || executableFile;
4519
4519
  }
4520
- launchWithNode = sourceExt.includes(path13.extname(executableFile));
4520
+ launchWithNode = sourceExt.includes(path15.extname(executableFile));
4521
4521
  let proc2;
4522
4522
  if (process11.platform !== "win32") {
4523
4523
  if (launchWithNode) {
@@ -5432,7 +5432,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
5432
5432
  * @return {Command}
5433
5433
  */
5434
5434
  nameFromFilename(filename) {
5435
- this._name = path13.basename(filename, path13.extname(filename));
5435
+ this._name = path15.basename(filename, path15.extname(filename));
5436
5436
  return this;
5437
5437
  }
5438
5438
  /**
@@ -5446,9 +5446,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
5446
5446
  * @param {string} [path]
5447
5447
  * @return {(string|null|Command)}
5448
5448
  */
5449
- executableDir(path14) {
5450
- if (path14 === void 0) return this._executableDir;
5451
- this._executableDir = path14;
5449
+ executableDir(path16) {
5450
+ if (path16 === void 0) return this._executableDir;
5451
+ this._executableDir = path16;
5452
5452
  return this;
5453
5453
  }
5454
5454
  /**
@@ -5730,7 +5730,7 @@ var require_commander = __commonJS({
5730
5730
  var version;
5731
5731
  var init_package = __esm({
5732
5732
  "../cli-apps/package.json"() {
5733
- version = "3.9.17";
5733
+ version = "3.10.0";
5734
5734
  }
5735
5735
  });
5736
5736
 
@@ -5798,6 +5798,7 @@ __export(help_texts_exports, {
5798
5798
  initAppCommand: () => initAppCommand,
5799
5799
  initCommand: () => initCommand,
5800
5800
  interactiveMenu: () => interactiveMenu,
5801
+ migrateCommand: () => migrateCommand,
5801
5802
  programHelp: () => programHelp,
5802
5803
  sharedEnvConfigPrompts: () => sharedEnvConfigPrompts,
5803
5804
  updateEnvCommand: () => updateEnvCommand
@@ -5813,7 +5814,7 @@ ${title}:`];
5813
5814
  }
5814
5815
  return lines.join("\n");
5815
5816
  }
5816
- var programHelp, initCommand, aiCommand, interactiveMenu, azureProgramHelp, azureOptions, azureInteractiveMenu, azureConfigPrompts, sharedEnvConfigPrompts, initAppCommand, addEnvCommand, updateEnvCommand;
5817
+ var programHelp, initCommand, aiCommand, migrateCommand, interactiveMenu, azureProgramHelp, azureOptions, azureInteractiveMenu, azureConfigPrompts, sharedEnvConfigPrompts, initAppCommand, addEnvCommand, updateEnvCommand;
5817
5818
  var init_help_texts = __esm({
5818
5819
  "../cli-apps/src/help-texts/index.ts"() {
5819
5820
  "use strict";
@@ -5954,11 +5955,56 @@ var init_help_texts = __esm({
5954
5955
  }
5955
5956
  }
5956
5957
  };
5958
+ migrateCommand = {
5959
+ description: "Migrates a V1 or V2 Seeka app to V3 structure using Claude AI",
5960
+ arguments: {
5961
+ source: "Path to the V1 or V2 app source directory"
5962
+ },
5963
+ options: {
5964
+ output: {
5965
+ description: "Output directory for the migrated V3 app"
5966
+ },
5967
+ template: {
5968
+ description: "Target server template",
5969
+ choices: ["azure-function", "aws-lambda", "netlify-function"]
5970
+ },
5971
+ orgName: {
5972
+ description: "Organization name for V3 package naming (e.g., seeka-labs-apps)"
5973
+ },
5974
+ appName: {
5975
+ description: "App name override (auto-detected from source if not provided)"
5976
+ },
5977
+ apiKey: {
5978
+ description: "Anthropic API key (defaults to ANTHROPIC_API_KEY env var)"
5979
+ }
5980
+ },
5981
+ interactive: {
5982
+ source: {
5983
+ message: "Path to the V1 or V2 app source directory:",
5984
+ validation: {
5985
+ required: "Source directory is required"
5986
+ }
5987
+ },
5988
+ output: {
5989
+ message: "Output directory for the migrated V3 app:",
5990
+ validation: {
5991
+ required: "Output directory is required"
5992
+ }
5993
+ },
5994
+ orgName: {
5995
+ message: "Organization name for V3 package naming (e.g., seeka-labs-apps):"
5996
+ },
5997
+ appName: {
5998
+ message: "App name (leave blank to auto-detect from source):"
5999
+ }
6000
+ }
6001
+ };
5957
6002
  interactiveMenu = {
5958
6003
  message: "What would you like to do?",
5959
6004
  choices: {
5960
6005
  init: "Initialize a new Seeka app",
5961
- aiContext: "Install AI context files"
6006
+ aiContext: "Install AI context files",
6007
+ migrate: "Migrate a V1/V2 app to V3"
5962
6008
  }
5963
6009
  };
5964
6010
  azureProgramHelp = {
@@ -5981,7 +6027,7 @@ var init_help_texts = __esm({
5981
6027
  short: "Init app"
5982
6028
  },
5983
6029
  addEnv: {
5984
- name: "Add environment to existing GitHub repository",
6030
+ name: "Add environment (production or staging) to existing repository",
5985
6031
  short: "Add env"
5986
6032
  },
5987
6033
  updateEnv: {
@@ -6049,6 +6095,27 @@ var init_help_texts = __esm({
6049
6095
  },
6050
6096
  selfHostBaseUrl: {
6051
6097
  message: "Enter SELF_HOST_BASEURL:"
6098
+ },
6099
+ otelExporterOtlpTracesEndpoint: {
6100
+ message: "Enter OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (optional):"
6101
+ },
6102
+ otelExporterOtlpTracesHeaders: {
6103
+ message: "Enter OTEL_EXPORTER_OTLP_TRACES_HEADERS (optional):"
6104
+ },
6105
+ seekaIngestUrl: {
6106
+ message: "Enter SEEKA_INGEST_URL (optional):"
6107
+ },
6108
+ seekaIssuerUrl: {
6109
+ message: "Enter SEEKA_ISSUER_URL (optional):"
6110
+ },
6111
+ seekaTelemetryUrl: {
6112
+ message: "Enter SEEKA_TELEMETRY_URL (optional):"
6113
+ },
6114
+ azureFuncResourceName: {
6115
+ message: "Enter Azure Function App resource name:",
6116
+ validation: {
6117
+ required: "Azure Function App resource name is required"
6118
+ }
6052
6119
  }
6053
6120
  };
6054
6121
  initAppCommand = {
@@ -6099,6 +6166,12 @@ var init_help_texts = __esm({
6099
6166
  addEnvCommand = {
6100
6167
  description: "Add a new environment to an existing GitHub repository",
6101
6168
  interactive: {
6169
+ environmentType: {
6170
+ message: "What type of environment are you setting up?",
6171
+ validation: {
6172
+ required: "Environment type is required"
6173
+ }
6174
+ },
6102
6175
  owner: {
6103
6176
  message: "Enter GitHub repository owner (username or organization):",
6104
6177
  validation: {
@@ -6123,9 +6196,6 @@ var init_help_texts = __esm({
6123
6196
  required: "Azure Function Resource Group Name is required"
6124
6197
  }
6125
6198
  },
6126
- azureFuncSlotName: {
6127
- message: "Enter AZURE_FUNC_SLOT_NAME (empty for production):"
6128
- },
6129
6199
  viteBaseUrl: {
6130
6200
  message: "Enter VITE_BASE_URL:",
6131
6201
  validation: {
@@ -6174,9 +6244,6 @@ var init_help_texts = __esm({
6174
6244
  required: "Azure Function Resource Group Name is required"
6175
6245
  }
6176
6246
  },
6177
- azureFuncSlotName: {
6178
- message: "Enter AZURE_FUNC_SLOT_NAME (empty for production):"
6179
- },
6180
6247
  ...sharedEnvConfigPrompts
6181
6248
  },
6182
6249
  confirmOverwrite: {
@@ -13878,10 +13945,10 @@ var require_lib2 = __commonJS({
13878
13945
  exports2.analyse = analyse;
13879
13946
  var detectFile = (filepath, opts = {}) => new Promise((resolve5, reject) => {
13880
13947
  let fd;
13881
- const fs16 = (0, node_1.default)();
13948
+ const fs18 = (0, node_1.default)();
13882
13949
  const handler2 = (err, buffer) => {
13883
13950
  if (fd) {
13884
- fs16.closeSync(fd);
13951
+ fs18.closeSync(fd);
13885
13952
  }
13886
13953
  if (err) {
13887
13954
  reject(err);
@@ -13893,9 +13960,9 @@ var require_lib2 = __commonJS({
13893
13960
  };
13894
13961
  const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
13895
13962
  if (sampleSize > 0) {
13896
- fd = fs16.openSync(filepath, "r");
13963
+ fd = fs18.openSync(filepath, "r");
13897
13964
  let sample = Buffer.allocUnsafe(sampleSize);
13898
- fs16.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
13965
+ fs18.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
13899
13966
  if (err) {
13900
13967
  handler2(err, null);
13901
13968
  } else {
@@ -13907,22 +13974,22 @@ var require_lib2 = __commonJS({
13907
13974
  });
13908
13975
  return;
13909
13976
  }
13910
- fs16.readFile(filepath, handler2);
13977
+ fs18.readFile(filepath, handler2);
13911
13978
  });
13912
13979
  exports2.detectFile = detectFile;
13913
13980
  var detectFileSync = (filepath, opts = {}) => {
13914
- const fs16 = (0, node_1.default)();
13981
+ const fs18 = (0, node_1.default)();
13915
13982
  if (opts && opts.sampleSize) {
13916
- const fd = fs16.openSync(filepath, "r");
13983
+ const fd = fs18.openSync(filepath, "r");
13917
13984
  let sample = Buffer.allocUnsafe(opts.sampleSize);
13918
- const bytesRead = fs16.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
13985
+ const bytesRead = fs18.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
13919
13986
  if (bytesRead < opts.sampleSize) {
13920
13987
  sample = sample.subarray(0, bytesRead);
13921
13988
  }
13922
- fs16.closeSync(fd);
13989
+ fs18.closeSync(fd);
13923
13990
  return (0, exports2.detect)(sample);
13924
13991
  }
13925
- return (0, exports2.detect)(fs16.readFileSync(filepath));
13992
+ return (0, exports2.detect)(fs18.readFileSync(filepath));
13926
13993
  };
13927
13994
  exports2.detectFileSync = detectFileSync;
13928
13995
  exports2.default = {
@@ -28444,9 +28511,9 @@ var init_prompt = __esm({
28444
28511
  init_dist3();
28445
28512
  init_dist2();
28446
28513
  _ = {
28447
- set: (obj, path13 = "", value) => {
28514
+ set: (obj, path15 = "", value) => {
28448
28515
  let pointer = obj;
28449
- path13.split(".").forEach((key, index2, arr) => {
28516
+ path15.split(".").forEach((key, index2, arr) => {
28450
28517
  if (key === "__proto__" || key === "constructor")
28451
28518
  return;
28452
28519
  if (index2 === arr.length - 1) {
@@ -28457,8 +28524,8 @@ var init_prompt = __esm({
28457
28524
  pointer = pointer[key];
28458
28525
  });
28459
28526
  },
28460
- get: (obj, path13 = "", defaultValue) => {
28461
- const travel = (regexp) => String.prototype.split.call(path13, regexp).filter(Boolean).reduce(
28527
+ get: (obj, path15 = "", defaultValue) => {
28528
+ const travel = (regexp) => String.prototype.split.call(path15, regexp).filter(Boolean).reduce(
28462
28529
  // @ts-expect-error implicit any on res[key]
28463
28530
  (res, key) => res == null ? res : res[key],
28464
28531
  obj
@@ -28679,45 +28746,193 @@ var init_dist16 = __esm({
28679
28746
  }
28680
28747
  });
28681
28748
 
28749
+ // ../cli-apps/src/config/seeka-dir.ts
28750
+ var fs, path2, SEEKA_DIR, resolveAppConfigPath, resolveSdkConfigPath, resolveEnvironmentConfigPath, ensureDir, writeJsonFile, readJsonFile;
28751
+ var init_seeka_dir = __esm({
28752
+ "../cli-apps/src/config/seeka-dir.ts"() {
28753
+ "use strict";
28754
+ fs = __toESM(require("fs"), 1);
28755
+ path2 = __toESM(require("path"), 1);
28756
+ SEEKA_DIR = ".seeka";
28757
+ resolveAppConfigPath = (baseDir) => path2.join(baseDir, SEEKA_DIR, "app.json");
28758
+ resolveSdkConfigPath = (baseDir) => path2.join(baseDir, SEEKA_DIR, "sdk.json");
28759
+ resolveEnvironmentConfigPath = (baseDir, envName) => path2.join(baseDir, SEEKA_DIR, "environments", `${envName}.json`);
28760
+ ensureDir = (dirPath) => {
28761
+ fs.mkdirSync(dirPath, { recursive: true });
28762
+ };
28763
+ writeJsonFile = (filePath, data) => {
28764
+ ensureDir(path2.dirname(filePath));
28765
+ fs.writeFileSync(filePath, JSON.stringify(data, null, 2), { mode: 384 });
28766
+ };
28767
+ readJsonFile = (filePath) => {
28768
+ try {
28769
+ return JSON.parse(fs.readFileSync(filePath, "utf-8"));
28770
+ } catch {
28771
+ return null;
28772
+ }
28773
+ };
28774
+ }
28775
+ });
28776
+
28777
+ // ../cli-apps/src/config/seeka-dir-migration.ts
28778
+ var fs2, path3, OLD_APP_CONFIG_FILENAME, OLD_SECRETS_CONFIG_FILENAME, oldEnvironmentSecretsFilename, APP_IDENTITY_KEYS, resolveSourceDir, discoverOldEnvFiles, migrateSeekaDirStructure;
28779
+ var init_seeka_dir_migration = __esm({
28780
+ "../cli-apps/src/config/seeka-dir-migration.ts"() {
28781
+ "use strict";
28782
+ fs2 = __toESM(require("fs"), 1);
28783
+ path3 = __toESM(require("path"), 1);
28784
+ init_seeka_dir();
28785
+ OLD_APP_CONFIG_FILENAME = "init.app.seeka.cli.config.json";
28786
+ OLD_SECRETS_CONFIG_FILENAME = "init.app.secrets.seeka.cli.config.json";
28787
+ oldEnvironmentSecretsFilename = (envName) => `${envName}.secrets.seeka.cli.config.json`;
28788
+ APP_IDENTITY_KEYS = [
28789
+ "orgName",
28790
+ "appName",
28791
+ "template"
28792
+ ];
28793
+ resolveSourceDir = (baseDir) => {
28794
+ const dotSeeka = path3.join(baseDir, ".seeka");
28795
+ if (fs2.existsSync(dotSeeka)) return dotSeeka;
28796
+ const legacySeeka = path3.join(baseDir, "seeka");
28797
+ if (fs2.existsSync(legacySeeka)) return legacySeeka;
28798
+ return null;
28799
+ };
28800
+ discoverOldEnvFiles = (envDir) => {
28801
+ if (!fs2.existsSync(envDir)) return [];
28802
+ const suffix = ".secrets.seeka.cli.config.json";
28803
+ return fs2.readdirSync(envDir).filter((f2) => f2.endsWith(suffix)).map((f2) => ({
28804
+ envName: f2.slice(0, -suffix.length),
28805
+ filePath: path3.join(envDir, f2)
28806
+ }));
28807
+ };
28808
+ migrateSeekaDirStructure = (baseDir) => {
28809
+ const appConfigPath = resolveAppConfigPath(baseDir);
28810
+ if (fs2.existsSync(appConfigPath)) {
28811
+ return { migrated: false, reason: "already-migrated" };
28812
+ }
28813
+ const sourceDir = resolveSourceDir(baseDir);
28814
+ if (!sourceDir) {
28815
+ return { migrated: false, reason: "nothing-to-migrate" };
28816
+ }
28817
+ const actions = [];
28818
+ const oldAppConfigPath = path3.join(sourceDir, OLD_APP_CONFIG_FILENAME);
28819
+ if (fs2.existsSync(oldAppConfigPath)) {
28820
+ const oldAppConfig = readJsonFile(oldAppConfigPath);
28821
+ if (oldAppConfig) {
28822
+ const appConfig = {};
28823
+ for (const key of APP_IDENTITY_KEYS) {
28824
+ if (key in oldAppConfig) {
28825
+ appConfig[key] = oldAppConfig[key];
28826
+ }
28827
+ }
28828
+ writeJsonFile(resolveAppConfigPath(baseDir), appConfig);
28829
+ actions.push(`Created app.json from ${OLD_APP_CONFIG_FILENAME}`);
28830
+ let scaffoldedAt;
28831
+ try {
28832
+ const stat = fs2.statSync(oldAppConfigPath);
28833
+ scaffoldedAt = stat.mtime.toISOString();
28834
+ } catch {
28835
+ scaffoldedAt = (/* @__PURE__ */ new Date()).toISOString();
28836
+ }
28837
+ const sdkConfig = {
28838
+ version: "unknown",
28839
+ scaffoldedAt
28840
+ };
28841
+ writeJsonFile(resolveSdkConfigPath(baseDir), sdkConfig);
28842
+ actions.push(`Created sdk.json from ${OLD_APP_CONFIG_FILENAME}`);
28843
+ }
28844
+ }
28845
+ const oldSecretsPath = path3.join(sourceDir, OLD_SECRETS_CONFIG_FILENAME);
28846
+ if (fs2.existsSync(oldSecretsPath)) {
28847
+ const secretsData = readJsonFile(oldSecretsPath);
28848
+ if (secretsData) {
28849
+ writeJsonFile(resolveEnvironmentConfigPath(baseDir, "prod"), secretsData);
28850
+ actions.push(`Created environments/prod.json from ${OLD_SECRETS_CONFIG_FILENAME}`);
28851
+ }
28852
+ }
28853
+ const envDir = path3.join(sourceDir, "environments");
28854
+ const oldEnvFiles = discoverOldEnvFiles(envDir);
28855
+ for (const { envName, filePath } of oldEnvFiles) {
28856
+ const newEnvPath = resolveEnvironmentConfigPath(baseDir, envName);
28857
+ if (!fs2.existsSync(newEnvPath)) {
28858
+ const envData = readJsonFile(filePath);
28859
+ if (envData) {
28860
+ writeJsonFile(newEnvPath, envData);
28861
+ actions.push(`Created environments/${envName}.json from ${oldEnvironmentSecretsFilename(envName)}`);
28862
+ }
28863
+ }
28864
+ }
28865
+ if (actions.length === 0) {
28866
+ return { migrated: false, reason: "nothing-to-migrate" };
28867
+ }
28868
+ return { migrated: true, actions };
28869
+ };
28870
+ }
28871
+ });
28872
+
28682
28873
  // src/config/initConfig.ts
28683
28874
  function resolveInitConfigPath(configFilePath) {
28684
28875
  if (configFilePath) {
28685
- return path2.isAbsolute(configFilePath) ? configFilePath : path2.resolve(process.cwd(), configFilePath);
28876
+ return path4.isAbsolute(configFilePath) ? configFilePath : path4.resolve(process.cwd(), configFilePath);
28877
+ }
28878
+ const newAppConfigPath = resolveAppConfigPath(process.cwd());
28879
+ if (fs3.existsSync(newAppConfigPath)) {
28880
+ return newAppConfigPath;
28686
28881
  }
28687
- const defaultPath = path2.resolve(process.cwd(), DEFAULT_INIT_CONFIG_RELATIVE_PATH);
28688
- if (fs.existsSync(defaultPath)) {
28882
+ const defaultPath = path4.resolve(process.cwd(), DEFAULT_INIT_CONFIG_RELATIVE_PATH);
28883
+ if (fs3.existsSync(defaultPath)) {
28884
+ migrateSeekaDirStructure(process.cwd());
28689
28885
  return defaultPath;
28690
28886
  }
28691
- const legacyPath = path2.resolve(process.cwd(), LEGACY_INIT_CONFIG_RELATIVE_PATH);
28692
- if (fs.existsSync(legacyPath)) {
28887
+ const legacyPath = path4.resolve(process.cwd(), LEGACY_INIT_CONFIG_RELATIVE_PATH);
28888
+ if (fs3.existsSync(legacyPath)) {
28889
+ migrateSeekaDirStructure(process.cwd());
28693
28890
  return legacyPath;
28694
28891
  }
28695
28892
  return defaultPath;
28696
28893
  }
28697
28894
  function resolveSecretsConfigPath(configFilePath) {
28698
28895
  if (configFilePath) {
28699
- return path2.isAbsolute(configFilePath) ? configFilePath : path2.resolve(process.cwd(), configFilePath);
28896
+ return path4.isAbsolute(configFilePath) ? configFilePath : path4.resolve(process.cwd(), configFilePath);
28700
28897
  }
28701
- const defaultPath = path2.resolve(process.cwd(), DEFAULT_SECRETS_CONFIG_RELATIVE_PATH);
28702
- if (fs.existsSync(defaultPath)) {
28898
+ const newProdEnvPath = resolveEnvironmentConfigPath(process.cwd(), "prod");
28899
+ if (fs3.existsSync(newProdEnvPath)) {
28900
+ return newProdEnvPath;
28901
+ }
28902
+ const defaultPath = path4.resolve(process.cwd(), DEFAULT_SECRETS_CONFIG_RELATIVE_PATH);
28903
+ if (fs3.existsSync(defaultPath)) {
28904
+ migrateSeekaDirStructure(process.cwd());
28703
28905
  return defaultPath;
28704
28906
  }
28705
- const legacyPath = path2.resolve(process.cwd(), LEGACY_SECRETS_CONFIG_RELATIVE_PATH);
28706
- if (fs.existsSync(legacyPath)) {
28907
+ const legacyPath = path4.resolve(process.cwd(), LEGACY_SECRETS_CONFIG_RELATIVE_PATH);
28908
+ if (fs3.existsSync(legacyPath)) {
28909
+ migrateSeekaDirStructure(process.cwd());
28707
28910
  return legacyPath;
28708
28911
  }
28709
28912
  return defaultPath;
28710
28913
  }
28914
+ function resolveEnvironmentSecretsConfigPath(environmentName) {
28915
+ const newEnvPath = resolveEnvironmentConfigPath(process.cwd(), environmentName);
28916
+ if (fs3.existsSync(newEnvPath)) {
28917
+ return newEnvPath;
28918
+ }
28919
+ const envPath = path4.resolve(process.cwd(), ".seeka", "environments", `${environmentName}.secrets.seeka.cli.config.json`);
28920
+ if (fs3.existsSync(envPath)) {
28921
+ migrateSeekaDirStructure(process.cwd());
28922
+ return envPath;
28923
+ }
28924
+ return envPath;
28925
+ }
28711
28926
  function readInitConfig(configPath) {
28712
- if (!fs.existsSync(configPath)) {
28927
+ if (!fs3.existsSync(configPath)) {
28713
28928
  return null;
28714
28929
  }
28715
- const raw = fs.readFileSync(configPath, "utf-8");
28930
+ const raw = fs3.readFileSync(configPath, "utf-8");
28716
28931
  return JSON.parse(raw);
28717
28932
  }
28718
28933
  function writeInitConfig(configPath, config) {
28719
- fs.mkdirSync(path2.dirname(configPath), { recursive: true });
28720
- fs.writeFileSync(configPath, `${JSON.stringify(config, null, 2)}
28934
+ fs3.mkdirSync(path4.dirname(configPath), { recursive: true });
28935
+ fs3.writeFileSync(configPath, `${JSON.stringify(config, null, 2)}
28721
28936
  `, "utf-8");
28722
28937
  }
28723
28938
  function upsertInitConfig(configPath, patch) {
@@ -28739,16 +28954,18 @@ function upsertSecretsConfig(secretsConfigPath, environmentVariables) {
28739
28954
  };
28740
28955
  writeInitConfig(secretsConfigPath, next);
28741
28956
  }
28742
- var fs, path2, DEFAULT_INIT_CONFIG_RELATIVE_PATH, DEFAULT_SECRETS_CONFIG_RELATIVE_PATH, LEGACY_INIT_CONFIG_RELATIVE_PATH, LEGACY_SECRETS_CONFIG_RELATIVE_PATH;
28957
+ var fs3, path4, DEFAULT_INIT_CONFIG_RELATIVE_PATH, DEFAULT_SECRETS_CONFIG_RELATIVE_PATH, LEGACY_INIT_CONFIG_RELATIVE_PATH, LEGACY_SECRETS_CONFIG_RELATIVE_PATH;
28743
28958
  var init_initConfig = __esm({
28744
28959
  "src/config/initConfig.ts"() {
28745
28960
  "use strict";
28746
- fs = __toESM(require("fs"), 1);
28747
- path2 = __toESM(require("path"), 1);
28748
- DEFAULT_INIT_CONFIG_RELATIVE_PATH = path2.join(".seeka", "init.app.seeka.cli.config.json");
28749
- DEFAULT_SECRETS_CONFIG_RELATIVE_PATH = path2.join(".seeka", "init.app.secrets.seeka.cli.config.json");
28750
- LEGACY_INIT_CONFIG_RELATIVE_PATH = path2.join("seeka", "init.app.seeka.cli.config.json");
28751
- LEGACY_SECRETS_CONFIG_RELATIVE_PATH = path2.join("seeka", "init.app.secrets.seeka.cli.config.json");
28961
+ fs3 = __toESM(require("fs"), 1);
28962
+ path4 = __toESM(require("path"), 1);
28963
+ init_seeka_dir();
28964
+ init_seeka_dir_migration();
28965
+ DEFAULT_INIT_CONFIG_RELATIVE_PATH = path4.join(".seeka", "init.app.seeka.cli.config.json");
28966
+ DEFAULT_SECRETS_CONFIG_RELATIVE_PATH = path4.join(".seeka", "init.app.secrets.seeka.cli.config.json");
28967
+ LEGACY_INIT_CONFIG_RELATIVE_PATH = path4.join("seeka", "init.app.seeka.cli.config.json");
28968
+ LEGACY_SECRETS_CONFIG_RELATIVE_PATH = path4.join("seeka", "init.app.secrets.seeka.cli.config.json");
28752
28969
  }
28753
28970
  });
28754
28971
 
@@ -29870,17 +30087,17 @@ function requestLog(octokit) {
29870
30087
  octokit.log.debug("request", options);
29871
30088
  const start = Date.now();
29872
30089
  const requestOptions = octokit.request.endpoint.parse(options);
29873
- const path13 = requestOptions.url.replace(options.baseUrl, "");
30090
+ const path15 = requestOptions.url.replace(options.baseUrl, "");
29874
30091
  return request2(options).then((response) => {
29875
30092
  const requestId = response.headers["x-github-request-id"];
29876
30093
  octokit.log.info(
29877
- `${requestOptions.method} ${path13} - ${response.status} with id ${requestId} in ${Date.now() - start}ms`
30094
+ `${requestOptions.method} ${path15} - ${response.status} with id ${requestId} in ${Date.now() - start}ms`
29878
30095
  );
29879
30096
  return response;
29880
30097
  }).catch((error) => {
29881
30098
  const requestId = error.response?.headers["x-github-request-id"] || "UNKNOWN";
29882
30099
  octokit.log.error(
29883
- `${requestOptions.method} ${path13} - ${error.status} with id ${requestId} in ${Date.now() - start}ms`
30100
+ `${requestOptions.method} ${path15} - ${error.status} with id ${requestId} in ${Date.now() - start}ms`
29884
30101
  );
29885
30102
  throw error;
29886
30103
  });
@@ -32696,15 +32913,15 @@ var init_wsl_utils = __esm({
32696
32913
  const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
32697
32914
  return stdout.trim();
32698
32915
  };
32699
- convertWslPathToWindows = async (path13) => {
32700
- if (/^[a-z]+:\/\//i.test(path13)) {
32701
- return path13;
32916
+ convertWslPathToWindows = async (path15) => {
32917
+ if (/^[a-z]+:\/\//i.test(path15)) {
32918
+ return path15;
32702
32919
  }
32703
32920
  try {
32704
- const { stdout } = await execFile2("wslpath", ["-aw", path13], { encoding: "utf8" });
32921
+ const { stdout } = await execFile2("wslpath", ["-aw", path15], { encoding: "utf8" });
32705
32922
  return stdout.trim();
32706
32923
  } catch {
32707
- return path13;
32924
+ return path15;
32708
32925
  }
32709
32926
  };
32710
32927
  }
@@ -33313,48 +33530,20 @@ async function createRepository(octokit, options) {
33313
33530
  throw new Error(`Failed to create repository: ${error.message}`);
33314
33531
  }
33315
33532
  }
33316
- async function setRepositoryVariable(octokit, owner, repo, variable) {
33533
+ async function deleteRepositoryVariable(octokit, owner, repo, variableName) {
33317
33534
  try {
33318
- let exists = false;
33319
- try {
33320
- await octokit.actions.getRepoVariable({
33321
- owner,
33322
- repo,
33323
- name: variable.name
33324
- });
33325
- exists = true;
33326
- } catch (error) {
33327
- if (error.status !== 404) {
33328
- throw error;
33329
- }
33330
- }
33331
- if (exists) {
33332
- await octokit.actions.updateRepoVariable({
33333
- owner,
33334
- repo,
33335
- name: variable.name,
33336
- value: variable.value
33337
- });
33338
- } else {
33339
- await octokit.actions.createRepoVariable({
33340
- owner,
33341
- repo,
33342
- name: variable.name,
33343
- value: variable.value
33344
- });
33345
- }
33346
- console.log(` \u2713 Set repository variable: ${variable.name}`);
33535
+ await octokit.actions.deleteRepoVariable({
33536
+ owner,
33537
+ repo,
33538
+ name: variableName
33539
+ });
33540
+ console.log(` \u2713 Deleted repository variable: ${variableName}`);
33347
33541
  } catch (error) {
33348
- throw new Error(`Failed to set repository variable '${variable.name}': ${error.message}`);
33349
- }
33350
- }
33351
- async function setRepositoryVariables(octokit, owner, repo, variables) {
33352
- console.log(`
33353
- \u{1F527} Setting repository variables...`);
33354
- for (const variable of variables) {
33355
- await setRepositoryVariable(octokit, owner, repo, variable);
33542
+ if (error.status === 404) {
33543
+ return;
33544
+ }
33545
+ throw new Error(`Failed to delete repository variable '${variableName}': ${error.message}`);
33356
33546
  }
33357
- console.log("");
33358
33547
  }
33359
33548
  async function getAuthenticatedUser(octokit) {
33360
33549
  try {
@@ -33557,16 +33746,16 @@ var init_libsodium = __esm({
33557
33746
  var scriptDirectory2 = "";
33558
33747
  var readAsync2, readBinary2;
33559
33748
  if (ENVIRONMENT_IS_NODE2) {
33560
- var fs17 = null;
33749
+ var fs19 = null;
33561
33750
  scriptDirectory2 = __dirname3 + "/";
33562
33751
  readBinary2 = (filename) => {
33563
33752
  filename = isFileURI2(filename) ? new URL(filename) : filename;
33564
- var ret = fs17.readFileSync(filename);
33753
+ var ret = fs19.readFileSync(filename);
33565
33754
  return ret;
33566
33755
  };
33567
33756
  readAsync2 = async (filename, binary = true) => {
33568
33757
  filename = isFileURI2(filename) ? new URL(filename) : filename;
33569
- var ret = fs17.readFileSync(filename, binary ? void 0 : "utf8");
33758
+ var ret = fs19.readFileSync(filename, binary ? void 0 : "utf8");
33570
33759
  return ret;
33571
33760
  };
33572
33761
  if (process.argv.length > 1) {
@@ -76246,16 +76435,16 @@ var init_libsodium = __esm({
76246
76435
  var scriptDirectory = "";
76247
76436
  var readAsync, readBinary;
76248
76437
  if (ENVIRONMENT_IS_NODE) {
76249
- var fs16 = null;
76438
+ var fs18 = null;
76250
76439
  scriptDirectory = __dirname3 + "/";
76251
76440
  readBinary = (filename) => {
76252
76441
  filename = isFileURI(filename) ? new URL(filename) : filename;
76253
- var ret = fs16.readFileSync(filename);
76442
+ var ret = fs18.readFileSync(filename);
76254
76443
  return ret;
76255
76444
  };
76256
76445
  readAsync = async (filename, binary = true) => {
76257
76446
  filename = isFileURI(filename) ? new URL(filename) : filename;
76258
- var ret = fs16.readFileSync(filename, binary ? void 0 : "utf8");
76447
+ var ret = fs18.readFileSync(filename, binary ? void 0 : "utf8");
76259
76448
  return ret;
76260
76449
  };
76261
76450
  if (process.argv.length > 1) {
@@ -80030,22 +80219,6 @@ async function setEnvironmentVariable(octokit, owner, repo, environmentName, var
80030
80219
  throw new Error(`Failed to set environment variable '${variable.name}': ${error.message}`);
80031
80220
  }
80032
80221
  }
80033
- async function deleteEnvironmentVariable(octokit, owner, repo, environmentName, variableName) {
80034
- try {
80035
- await octokit.actions.deleteEnvironmentVariable({
80036
- owner,
80037
- repo,
80038
- environment_name: environmentName,
80039
- name: variableName
80040
- });
80041
- console.log(` \u2713 Deleted environment variable: ${variableName}`);
80042
- } catch (error) {
80043
- if (error.status === 404) {
80044
- return;
80045
- }
80046
- throw new Error(`Failed to delete environment variable '${variableName}': ${error.message}`);
80047
- }
80048
- }
80049
80222
  async function getEnvironmentPublicKey(octokit, owner, repo, environmentName) {
80050
80223
  const { data } = await octokit.actions.getEnvironmentPublicKey({
80051
80224
  owner,
@@ -80329,8 +80502,8 @@ var require_windows = __commonJS({
80329
80502
  "../../node_modules/cross-spawn/node_modules/isexe/windows.js"(exports2, module2) {
80330
80503
  module2.exports = isexe;
80331
80504
  isexe.sync = sync4;
80332
- var fs16 = require("fs");
80333
- function checkPathExt(path13, options) {
80505
+ var fs18 = require("fs");
80506
+ function checkPathExt(path15, options) {
80334
80507
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
80335
80508
  if (!pathext) {
80336
80509
  return true;
@@ -80341,25 +80514,25 @@ var require_windows = __commonJS({
80341
80514
  }
80342
80515
  for (var i2 = 0; i2 < pathext.length; i2++) {
80343
80516
  var p2 = pathext[i2].toLowerCase();
80344
- if (p2 && path13.substr(-p2.length).toLowerCase() === p2) {
80517
+ if (p2 && path15.substr(-p2.length).toLowerCase() === p2) {
80345
80518
  return true;
80346
80519
  }
80347
80520
  }
80348
80521
  return false;
80349
80522
  }
80350
- function checkStat(stat, path13, options) {
80523
+ function checkStat(stat, path15, options) {
80351
80524
  if (!stat.isSymbolicLink() && !stat.isFile()) {
80352
80525
  return false;
80353
80526
  }
80354
- return checkPathExt(path13, options);
80527
+ return checkPathExt(path15, options);
80355
80528
  }
80356
- function isexe(path13, options, cb) {
80357
- fs16.stat(path13, function(er2, stat) {
80358
- cb(er2, er2 ? false : checkStat(stat, path13, options));
80529
+ function isexe(path15, options, cb) {
80530
+ fs18.stat(path15, function(er2, stat) {
80531
+ cb(er2, er2 ? false : checkStat(stat, path15, options));
80359
80532
  });
80360
80533
  }
80361
- function sync4(path13, options) {
80362
- return checkStat(fs16.statSync(path13), path13, options);
80534
+ function sync4(path15, options) {
80535
+ return checkStat(fs18.statSync(path15), path15, options);
80363
80536
  }
80364
80537
  }
80365
80538
  });
@@ -80369,14 +80542,14 @@ var require_mode = __commonJS({
80369
80542
  "../../node_modules/cross-spawn/node_modules/isexe/mode.js"(exports2, module2) {
80370
80543
  module2.exports = isexe;
80371
80544
  isexe.sync = sync4;
80372
- var fs16 = require("fs");
80373
- function isexe(path13, options, cb) {
80374
- fs16.stat(path13, function(er2, stat) {
80545
+ var fs18 = require("fs");
80546
+ function isexe(path15, options, cb) {
80547
+ fs18.stat(path15, function(er2, stat) {
80375
80548
  cb(er2, er2 ? false : checkStat(stat, options));
80376
80549
  });
80377
80550
  }
80378
- function sync4(path13, options) {
80379
- return checkStat(fs16.statSync(path13), options);
80551
+ function sync4(path15, options) {
80552
+ return checkStat(fs18.statSync(path15), options);
80380
80553
  }
80381
80554
  function checkStat(stat, options) {
80382
80555
  return stat.isFile() && checkMode(stat, options);
@@ -80400,7 +80573,7 @@ var require_mode = __commonJS({
80400
80573
  // ../../node_modules/cross-spawn/node_modules/isexe/index.js
80401
80574
  var require_isexe = __commonJS({
80402
80575
  "../../node_modules/cross-spawn/node_modules/isexe/index.js"(exports2, module2) {
80403
- var fs16 = require("fs");
80576
+ var fs18 = require("fs");
80404
80577
  var core;
80405
80578
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
80406
80579
  core = require_windows();
@@ -80409,7 +80582,7 @@ var require_isexe = __commonJS({
80409
80582
  }
80410
80583
  module2.exports = isexe;
80411
80584
  isexe.sync = sync4;
80412
- function isexe(path13, options, cb) {
80585
+ function isexe(path15, options, cb) {
80413
80586
  if (typeof options === "function") {
80414
80587
  cb = options;
80415
80588
  options = {};
@@ -80419,7 +80592,7 @@ var require_isexe = __commonJS({
80419
80592
  throw new TypeError("callback not provided");
80420
80593
  }
80421
80594
  return new Promise(function(resolve5, reject) {
80422
- isexe(path13, options || {}, function(er2, is) {
80595
+ isexe(path15, options || {}, function(er2, is) {
80423
80596
  if (er2) {
80424
80597
  reject(er2);
80425
80598
  } else {
@@ -80428,7 +80601,7 @@ var require_isexe = __commonJS({
80428
80601
  });
80429
80602
  });
80430
80603
  }
80431
- core(path13, options || {}, function(er2, is) {
80604
+ core(path15, options || {}, function(er2, is) {
80432
80605
  if (er2) {
80433
80606
  if (er2.code === "EACCES" || options && options.ignoreErrors) {
80434
80607
  er2 = null;
@@ -80438,9 +80611,9 @@ var require_isexe = __commonJS({
80438
80611
  cb(er2, is);
80439
80612
  });
80440
80613
  }
80441
- function sync4(path13, options) {
80614
+ function sync4(path15, options) {
80442
80615
  try {
80443
- return core.sync(path13, options || {});
80616
+ return core.sync(path15, options || {});
80444
80617
  } catch (er2) {
80445
80618
  if (options && options.ignoreErrors || er2.code === "EACCES") {
80446
80619
  return false;
@@ -80456,7 +80629,7 @@ var require_isexe = __commonJS({
80456
80629
  var require_which = __commonJS({
80457
80630
  "../../node_modules/cross-spawn/node_modules/which/which.js"(exports2, module2) {
80458
80631
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
80459
- var path13 = require("path");
80632
+ var path15 = require("path");
80460
80633
  var COLON = isWindows ? ";" : ":";
80461
80634
  var isexe = require_isexe();
80462
80635
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -80494,7 +80667,7 @@ var require_which = __commonJS({
80494
80667
  return opt.all && found.length ? resolve5(found) : reject(getNotFoundError(cmd));
80495
80668
  const ppRaw = pathEnv[i2];
80496
80669
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
80497
- const pCmd = path13.join(pathPart, cmd);
80670
+ const pCmd = path15.join(pathPart, cmd);
80498
80671
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
80499
80672
  resolve5(subStep(p2, i2, 0));
80500
80673
  });
@@ -80521,7 +80694,7 @@ var require_which = __commonJS({
80521
80694
  for (let i2 = 0; i2 < pathEnv.length; i2++) {
80522
80695
  const ppRaw = pathEnv[i2];
80523
80696
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
80524
- const pCmd = path13.join(pathPart, cmd);
80697
+ const pCmd = path15.join(pathPart, cmd);
80525
80698
  const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
80526
80699
  for (let j2 = 0; j2 < pathExt.length; j2++) {
80527
80700
  const cur = p2 + pathExt[j2];
@@ -80569,7 +80742,7 @@ var require_path_key = __commonJS({
80569
80742
  var require_resolveCommand = __commonJS({
80570
80743
  "../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
80571
80744
  "use strict";
80572
- var path13 = require("path");
80745
+ var path15 = require("path");
80573
80746
  var which = require_which();
80574
80747
  var getPathKey = require_path_key();
80575
80748
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -80587,7 +80760,7 @@ var require_resolveCommand = __commonJS({
80587
80760
  try {
80588
80761
  resolved = which.sync(parsed.command, {
80589
80762
  path: env[getPathKey({ env })],
80590
- pathExt: withoutPathExt ? path13.delimiter : void 0
80763
+ pathExt: withoutPathExt ? path15.delimiter : void 0
80591
80764
  });
80592
80765
  } catch (e) {
80593
80766
  } finally {
@@ -80596,7 +80769,7 @@ var require_resolveCommand = __commonJS({
80596
80769
  }
80597
80770
  }
80598
80771
  if (resolved) {
80599
- resolved = path13.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
80772
+ resolved = path15.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
80600
80773
  }
80601
80774
  return resolved;
80602
80775
  }
@@ -80650,8 +80823,8 @@ var require_shebang_command = __commonJS({
80650
80823
  if (!match2) {
80651
80824
  return null;
80652
80825
  }
80653
- const [path13, argument] = match2[0].replace(/#! ?/, "").split(" ");
80654
- const binary = path13.split("/").pop();
80826
+ const [path15, argument] = match2[0].replace(/#! ?/, "").split(" ");
80827
+ const binary = path15.split("/").pop();
80655
80828
  if (binary === "env") {
80656
80829
  return argument;
80657
80830
  }
@@ -80664,16 +80837,16 @@ var require_shebang_command = __commonJS({
80664
80837
  var require_readShebang = __commonJS({
80665
80838
  "../../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
80666
80839
  "use strict";
80667
- var fs16 = require("fs");
80840
+ var fs18 = require("fs");
80668
80841
  var shebangCommand = require_shebang_command();
80669
80842
  function readShebang(command) {
80670
80843
  const size = 150;
80671
80844
  const buffer = Buffer.alloc(size);
80672
80845
  let fd;
80673
80846
  try {
80674
- fd = fs16.openSync(command, "r");
80675
- fs16.readSync(fd, buffer, 0, size, 0);
80676
- fs16.closeSync(fd);
80847
+ fd = fs18.openSync(command, "r");
80848
+ fs18.readSync(fd, buffer, 0, size, 0);
80849
+ fs18.closeSync(fd);
80677
80850
  } catch (e) {
80678
80851
  }
80679
80852
  return shebangCommand(buffer.toString());
@@ -80686,7 +80859,7 @@ var require_readShebang = __commonJS({
80686
80859
  var require_parse = __commonJS({
80687
80860
  "../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
80688
80861
  "use strict";
80689
- var path13 = require("path");
80862
+ var path15 = require("path");
80690
80863
  var resolveCommand = require_resolveCommand();
80691
80864
  var escape3 = require_escape();
80692
80865
  var readShebang = require_readShebang();
@@ -80711,7 +80884,7 @@ var require_parse = __commonJS({
80711
80884
  const needsShell = !isExecutableRegExp.test(commandFile);
80712
80885
  if (parsed.options.forceShell || needsShell) {
80713
80886
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
80714
- parsed.command = path13.normalize(parsed.command);
80887
+ parsed.command = path15.normalize(parsed.command);
80715
80888
  parsed.command = escape3.command(parsed.command);
80716
80889
  parsed.args = parsed.args.map((arg) => escape3.argument(arg, needsDoubleEscapeMetaChars));
80717
80890
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -80822,9 +80995,9 @@ var require_cross_spawn = __commonJS({
80822
80995
  });
80823
80996
 
80824
80997
  // ../cli-apps/src/helpers/index.ts
80825
- function isEmptyDir(path13) {
80998
+ function isEmptyDir(path15) {
80826
80999
  try {
80827
- const directory = fs7.opendirSync(path13);
81000
+ const directory = fs9.opendirSync(path15);
80828
81001
  const entry = directory.readSync();
80829
81002
  directory.closeSync();
80830
81003
  return entry === null;
@@ -80832,11 +81005,11 @@ function isEmptyDir(path13) {
80832
81005
  return false;
80833
81006
  }
80834
81007
  }
80835
- var fs7, isAlphaNumericAndHyphens;
81008
+ var fs9, isAlphaNumericAndHyphens;
80836
81009
  var init_helpers = __esm({
80837
81010
  "../cli-apps/src/helpers/index.ts"() {
80838
81011
  "use strict";
80839
- fs7 = __toESM(require("fs"), 1);
81012
+ fs9 = __toESM(require("fs"), 1);
80840
81013
  isAlphaNumericAndHyphens = (str) => {
80841
81014
  return /^[a-zA-Z0-9-]+$/.test(str);
80842
81015
  };
@@ -81705,7 +81878,7 @@ var init_escape = __esm({
81705
81878
  });
81706
81879
 
81707
81880
  // ../../node_modules/minimatch/dist/esm/index.js
81708
- var minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path4, sep2, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter2, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
81881
+ var minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path6, sep2, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter2, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
81709
81882
  var init_esm3 = __esm({
81710
81883
  "../../node_modules/minimatch/dist/esm/index.js"() {
81711
81884
  init_esm2();
@@ -81774,11 +81947,11 @@ var init_esm3 = __esm({
81774
81947
  return (f2) => f2.length === len && f2 !== "." && f2 !== "..";
81775
81948
  };
81776
81949
  defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
81777
- path4 = {
81950
+ path6 = {
81778
81951
  win32: { sep: "\\" },
81779
81952
  posix: { sep: "/" }
81780
81953
  };
81781
- sep2 = defaultPlatform === "win32" ? path4.win32.sep : path4.posix.sep;
81954
+ sep2 = defaultPlatform === "win32" ? path6.win32.sep : path6.posix.sep;
81782
81955
  minimatch.sep = sep2;
81783
81956
  GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
81784
81957
  minimatch.GLOBSTAR = GLOBSTAR;
@@ -85033,12 +85206,12 @@ var init_esm6 = __esm({
85033
85206
  /**
85034
85207
  * Get the Path object referenced by the string path, resolved from this Path
85035
85208
  */
85036
- resolve(path13) {
85037
- if (!path13) {
85209
+ resolve(path15) {
85210
+ if (!path15) {
85038
85211
  return this;
85039
85212
  }
85040
- const rootPath = this.getRootString(path13);
85041
- const dir = path13.substring(rootPath.length);
85213
+ const rootPath = this.getRootString(path15);
85214
+ const dir = path15.substring(rootPath.length);
85042
85215
  const dirParts = dir.split(this.splitSep);
85043
85216
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
85044
85217
  return result;
@@ -85790,8 +85963,8 @@ var init_esm6 = __esm({
85790
85963
  /**
85791
85964
  * @internal
85792
85965
  */
85793
- getRootString(path13) {
85794
- return import_node_path3.win32.parse(path13).root;
85966
+ getRootString(path15) {
85967
+ return import_node_path3.win32.parse(path15).root;
85795
85968
  }
85796
85969
  /**
85797
85970
  * @internal
@@ -85837,8 +86010,8 @@ var init_esm6 = __esm({
85837
86010
  /**
85838
86011
  * @internal
85839
86012
  */
85840
- getRootString(path13) {
85841
- return path13.startsWith("/") ? "/" : "";
86013
+ getRootString(path15) {
86014
+ return path15.startsWith("/") ? "/" : "";
85842
86015
  }
85843
86016
  /**
85844
86017
  * @internal
@@ -85887,8 +86060,8 @@ var init_esm6 = __esm({
85887
86060
  *
85888
86061
  * @internal
85889
86062
  */
85890
- constructor(cwd = process.cwd(), pathImpl, sep4, { nocase, childrenCacheSize = 16 * 1024, fs: fs16 = defaultFS } = {}) {
85891
- this.#fs = fsFromOption(fs16);
86063
+ constructor(cwd = process.cwd(), pathImpl, sep4, { nocase, childrenCacheSize = 16 * 1024, fs: fs18 = defaultFS } = {}) {
86064
+ this.#fs = fsFromOption(fs18);
85892
86065
  if (cwd instanceof URL || cwd.startsWith("file://")) {
85893
86066
  cwd = (0, import_node_url2.fileURLToPath)(cwd);
85894
86067
  }
@@ -85927,11 +86100,11 @@ var init_esm6 = __esm({
85927
86100
  /**
85928
86101
  * Get the depth of a provided path, string, or the cwd
85929
86102
  */
85930
- depth(path13 = this.cwd) {
85931
- if (typeof path13 === "string") {
85932
- path13 = this.cwd.resolve(path13);
86103
+ depth(path15 = this.cwd) {
86104
+ if (typeof path15 === "string") {
86105
+ path15 = this.cwd.resolve(path15);
85933
86106
  }
85934
- return path13.depth();
86107
+ return path15.depth();
85935
86108
  }
85936
86109
  /**
85937
86110
  * Return the cache of child entries. Exposed so subclasses can create
@@ -86418,9 +86591,9 @@ var init_esm6 = __esm({
86418
86591
  process11();
86419
86592
  return results;
86420
86593
  }
86421
- chdir(path13 = this.cwd) {
86594
+ chdir(path15 = this.cwd) {
86422
86595
  const oldCwd = this.cwd;
86423
- this.cwd = typeof path13 === "string" ? this.cwd.resolve(path13) : path13;
86596
+ this.cwd = typeof path15 === "string" ? this.cwd.resolve(path15) : path15;
86424
86597
  this.cwd[setAsCwd](oldCwd);
86425
86598
  }
86426
86599
  };
@@ -86446,8 +86619,8 @@ var init_esm6 = __esm({
86446
86619
  /**
86447
86620
  * @internal
86448
86621
  */
86449
- newRoot(fs16) {
86450
- return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs16 });
86622
+ newRoot(fs18) {
86623
+ return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs18 });
86451
86624
  }
86452
86625
  /**
86453
86626
  * Return true if the provided path string is an absolute path
@@ -86475,8 +86648,8 @@ var init_esm6 = __esm({
86475
86648
  /**
86476
86649
  * @internal
86477
86650
  */
86478
- newRoot(fs16) {
86479
- return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs16 });
86651
+ newRoot(fs18) {
86652
+ return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs18 });
86480
86653
  }
86481
86654
  /**
86482
86655
  * Return true if the provided path string is an absolute path
@@ -86795,8 +86968,8 @@ var init_processor = __esm({
86795
86968
  }
86796
86969
  // match, absolute, ifdir
86797
86970
  entries() {
86798
- return [...this.store.entries()].map(([path13, n2]) => [
86799
- path13,
86971
+ return [...this.store.entries()].map(([path15, n2]) => [
86972
+ path15,
86800
86973
  !!(n2 & 2),
86801
86974
  !!(n2 & 1)
86802
86975
  ]);
@@ -87009,9 +87182,9 @@ var init_walker = __esm({
87009
87182
  signal;
87010
87183
  maxDepth;
87011
87184
  includeChildMatches;
87012
- constructor(patterns, path13, opts) {
87185
+ constructor(patterns, path15, opts) {
87013
87186
  this.patterns = patterns;
87014
- this.path = path13;
87187
+ this.path = path15;
87015
87188
  this.opts = opts;
87016
87189
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
87017
87190
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -87030,11 +87203,11 @@ var init_walker = __esm({
87030
87203
  });
87031
87204
  }
87032
87205
  }
87033
- #ignored(path13) {
87034
- return this.seen.has(path13) || !!this.#ignore?.ignored?.(path13);
87206
+ #ignored(path15) {
87207
+ return this.seen.has(path15) || !!this.#ignore?.ignored?.(path15);
87035
87208
  }
87036
- #childrenIgnored(path13) {
87037
- return !!this.#ignore?.childrenIgnored?.(path13);
87209
+ #childrenIgnored(path15) {
87210
+ return !!this.#ignore?.childrenIgnored?.(path15);
87038
87211
  }
87039
87212
  // backpressure mechanism
87040
87213
  pause() {
@@ -87249,8 +87422,8 @@ var init_walker = __esm({
87249
87422
  };
87250
87423
  GlobWalker = class extends GlobUtil {
87251
87424
  matches = /* @__PURE__ */ new Set();
87252
- constructor(patterns, path13, opts) {
87253
- super(patterns, path13, opts);
87425
+ constructor(patterns, path15, opts) {
87426
+ super(patterns, path15, opts);
87254
87427
  }
87255
87428
  matchEmit(e) {
87256
87429
  this.matches.add(e);
@@ -87287,8 +87460,8 @@ var init_walker = __esm({
87287
87460
  };
87288
87461
  GlobStream = class extends GlobUtil {
87289
87462
  results;
87290
- constructor(patterns, path13, opts) {
87291
- super(patterns, path13, opts);
87463
+ constructor(patterns, path15, opts) {
87464
+ super(patterns, path15, opts);
87292
87465
  this.results = new Minipass({
87293
87466
  signal: this.signal,
87294
87467
  objectMode: true
@@ -88536,9 +88709,9 @@ var require_pump = __commonJS({
88536
88709
  "../../node_modules/pump/index.js"(exports2, module2) {
88537
88710
  var once = require_once();
88538
88711
  var eos = require_end_of_stream();
88539
- var fs16;
88712
+ var fs18;
88540
88713
  try {
88541
- fs16 = require("fs");
88714
+ fs18 = require("fs");
88542
88715
  } catch (e) {
88543
88716
  }
88544
88717
  var noop3 = function() {
@@ -88549,8 +88722,8 @@ var require_pump = __commonJS({
88549
88722
  };
88550
88723
  var isFS = function(stream2) {
88551
88724
  if (!ancient) return false;
88552
- if (!fs16) return false;
88553
- return (stream2 instanceof (fs16.ReadStream || noop3) || stream2 instanceof (fs16.WriteStream || noop3)) && isFn(stream2.close);
88725
+ if (!fs18) return false;
88726
+ return (stream2 instanceof (fs18.ReadStream || noop3) || stream2 instanceof (fs18.WriteStream || noop3)) && isFn(stream2.close);
88554
88727
  };
88555
88728
  var isRequest = function(stream2) {
88556
88729
  return stream2.setHeader && isFn(stream2.abort);
@@ -88762,7 +88935,7 @@ var require_pend = __commonJS({
88762
88935
  // ../../node_modules/fd-slicer/index.js
88763
88936
  var require_fd_slicer = __commonJS({
88764
88937
  "../../node_modules/fd-slicer/index.js"(exports2) {
88765
- var fs16 = require("fs");
88938
+ var fs18 = require("fs");
88766
88939
  var util = require("util");
88767
88940
  var stream2 = require("stream");
88768
88941
  var Readable = stream2.Readable;
@@ -88787,7 +88960,7 @@ var require_fd_slicer = __commonJS({
88787
88960
  FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
88788
88961
  var self2 = this;
88789
88962
  self2.pend.go(function(cb) {
88790
- fs16.read(self2.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
88963
+ fs18.read(self2.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
88791
88964
  cb();
88792
88965
  callback(err, bytesRead, buffer2);
88793
88966
  });
@@ -88796,7 +88969,7 @@ var require_fd_slicer = __commonJS({
88796
88969
  FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
88797
88970
  var self2 = this;
88798
88971
  self2.pend.go(function(cb) {
88799
- fs16.write(self2.fd, buffer, offset, length, position, function(err, written, buffer2) {
88972
+ fs18.write(self2.fd, buffer, offset, length, position, function(err, written, buffer2) {
88800
88973
  cb();
88801
88974
  callback(err, written, buffer2);
88802
88975
  });
@@ -88817,7 +88990,7 @@ var require_fd_slicer = __commonJS({
88817
88990
  if (self2.refCount > 0) return;
88818
88991
  if (self2.refCount < 0) throw new Error("invalid unref");
88819
88992
  if (self2.autoClose) {
88820
- fs16.close(self2.fd, onCloseDone);
88993
+ fs18.close(self2.fd, onCloseDone);
88821
88994
  }
88822
88995
  function onCloseDone(err) {
88823
88996
  if (err) {
@@ -88854,7 +89027,7 @@ var require_fd_slicer = __commonJS({
88854
89027
  self2.context.pend.go(function(cb) {
88855
89028
  if (self2.destroyed) return cb();
88856
89029
  var buffer = new Buffer(toRead);
88857
- fs16.read(self2.context.fd, buffer, 0, toRead, self2.pos, function(err, bytesRead) {
89030
+ fs18.read(self2.context.fd, buffer, 0, toRead, self2.pos, function(err, bytesRead) {
88858
89031
  if (err) {
88859
89032
  self2.destroy(err);
88860
89033
  } else if (bytesRead === 0) {
@@ -88901,7 +89074,7 @@ var require_fd_slicer = __commonJS({
88901
89074
  }
88902
89075
  self2.context.pend.go(function(cb) {
88903
89076
  if (self2.destroyed) return cb();
88904
- fs16.write(self2.context.fd, buffer, 0, buffer.length, self2.pos, function(err2, bytes) {
89077
+ fs18.write(self2.context.fd, buffer, 0, buffer.length, self2.pos, function(err2, bytes) {
88905
89078
  if (err2) {
88906
89079
  self2.destroy();
88907
89080
  cb();
@@ -89328,7 +89501,7 @@ var require_buffer_crc32 = __commonJS({
89328
89501
  // ../../node_modules/yauzl/index.js
89329
89502
  var require_yauzl = __commonJS({
89330
89503
  "../../node_modules/yauzl/index.js"(exports2) {
89331
- var fs16 = require("fs");
89504
+ var fs18 = require("fs");
89332
89505
  var zlib = require("zlib");
89333
89506
  var fd_slicer = require_fd_slicer();
89334
89507
  var crc32 = require_buffer_crc32();
@@ -89346,7 +89519,7 @@ var require_yauzl = __commonJS({
89346
89519
  exports2.ZipFile = ZipFile;
89347
89520
  exports2.Entry = Entry;
89348
89521
  exports2.RandomAccessReader = RandomAccessReader;
89349
- function open2(path13, options, callback) {
89522
+ function open2(path15, options, callback) {
89350
89523
  if (typeof options === "function") {
89351
89524
  callback = options;
89352
89525
  options = null;
@@ -89358,10 +89531,10 @@ var require_yauzl = __commonJS({
89358
89531
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
89359
89532
  if (options.strictFileNames == null) options.strictFileNames = false;
89360
89533
  if (callback == null) callback = defaultCallback;
89361
- fs16.open(path13, "r", function(err, fd) {
89534
+ fs18.open(path15, "r", function(err, fd) {
89362
89535
  if (err) return callback(err);
89363
89536
  fromFd(fd, options, function(err2, zipfile) {
89364
- if (err2) fs16.close(fd, defaultCallback);
89537
+ if (err2) fs18.close(fd, defaultCallback);
89365
89538
  callback(err2, zipfile);
89366
89539
  });
89367
89540
  });
@@ -89378,7 +89551,7 @@ var require_yauzl = __commonJS({
89378
89551
  if (options.validateEntrySizes == null) options.validateEntrySizes = true;
89379
89552
  if (options.strictFileNames == null) options.strictFileNames = false;
89380
89553
  if (callback == null) callback = defaultCallback;
89381
- fs16.fstat(fd, function(err, stats) {
89554
+ fs18.fstat(fd, function(err, stats) {
89382
89555
  if (err) return callback(err);
89383
89556
  var reader = fd_slicer.createFromFd(fd, { autoClose: true });
89384
89557
  fromRandomAccessReader(reader, stats.size, options, callback);
@@ -89958,9 +90131,9 @@ var require_yauzl = __commonJS({
89958
90131
  var require_extract_zip = __commonJS({
89959
90132
  "../../node_modules/extract-zip/index.js"(exports2, module2) {
89960
90133
  var debug = require_src()("extract-zip");
89961
- var { createWriteStream, promises: fs16 } = require("fs");
90134
+ var { createWriteStream, promises: fs18 } = require("fs");
89962
90135
  var getStream = require_get_stream();
89963
- var path13 = require("path");
90136
+ var path15 = require("path");
89964
90137
  var { promisify: promisify7 } = require("util");
89965
90138
  var stream2 = require("stream");
89966
90139
  var yauzl = require_yauzl();
@@ -89997,12 +90170,12 @@ var require_extract_zip = __commonJS({
89997
90170
  this.zipfile.readEntry();
89998
90171
  return;
89999
90172
  }
90000
- const destDir = path13.dirname(path13.join(this.opts.dir, entry.fileName));
90173
+ const destDir = path15.dirname(path15.join(this.opts.dir, entry.fileName));
90001
90174
  try {
90002
- await fs16.mkdir(destDir, { recursive: true });
90003
- const canonicalDestDir = await fs16.realpath(destDir);
90004
- const relativeDestDir = path13.relative(this.opts.dir, canonicalDestDir);
90005
- if (relativeDestDir.split(path13.sep).includes("..")) {
90175
+ await fs18.mkdir(destDir, { recursive: true });
90176
+ const canonicalDestDir = await fs18.realpath(destDir);
90177
+ const relativeDestDir = path15.relative(this.opts.dir, canonicalDestDir);
90178
+ if (relativeDestDir.split(path15.sep).includes("..")) {
90006
90179
  throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
90007
90180
  }
90008
90181
  await this.extractEntry(entry);
@@ -90024,7 +90197,7 @@ var require_extract_zip = __commonJS({
90024
90197
  if (this.opts.onEntry) {
90025
90198
  this.opts.onEntry(entry, this.zipfile);
90026
90199
  }
90027
- const dest = path13.join(this.opts.dir, entry.fileName);
90200
+ const dest = path15.join(this.opts.dir, entry.fileName);
90028
90201
  const mode = entry.externalFileAttributes >> 16 & 65535;
90029
90202
  const IFMT2 = 61440;
90030
90203
  const IFDIR2 = 16384;
@@ -90038,20 +90211,20 @@ var require_extract_zip = __commonJS({
90038
90211
  if (!isDir) isDir = madeBy === 0 && entry.externalFileAttributes === 16;
90039
90212
  debug("extracting entry", { filename: entry.fileName, isDir, isSymlink: symlink });
90040
90213
  const procMode = this.getExtractedMode(mode, isDir) & 511;
90041
- const destDir = isDir ? dest : path13.dirname(dest);
90214
+ const destDir = isDir ? dest : path15.dirname(dest);
90042
90215
  const mkdirOptions = { recursive: true };
90043
90216
  if (isDir) {
90044
90217
  mkdirOptions.mode = procMode;
90045
90218
  }
90046
90219
  debug("mkdir", { dir: destDir, ...mkdirOptions });
90047
- await fs16.mkdir(destDir, mkdirOptions);
90220
+ await fs18.mkdir(destDir, mkdirOptions);
90048
90221
  if (isDir) return;
90049
90222
  debug("opening read stream", dest);
90050
90223
  const readStream = await promisify7(this.zipfile.openReadStream.bind(this.zipfile))(entry);
90051
90224
  if (symlink) {
90052
90225
  const link = await getStream(readStream);
90053
90226
  debug("creating symlink", link, dest);
90054
- await fs16.symlink(link, dest);
90227
+ await fs18.symlink(link, dest);
90055
90228
  } else {
90056
90229
  await pipeline(readStream, createWriteStream(dest, { mode: procMode }));
90057
90230
  }
@@ -90080,11 +90253,11 @@ var require_extract_zip = __commonJS({
90080
90253
  };
90081
90254
  module2.exports = async function(zipPath, opts) {
90082
90255
  debug("creating target directory", opts.dir);
90083
- if (!path13.isAbsolute(opts.dir)) {
90256
+ if (!path15.isAbsolute(opts.dir)) {
90084
90257
  throw new Error("Target directory is expected to be absolute");
90085
90258
  }
90086
- await fs16.mkdir(opts.dir, { recursive: true });
90087
- opts.dir = await fs16.realpath(opts.dir);
90259
+ await fs18.mkdir(opts.dir, { recursive: true });
90260
+ opts.dir = await fs18.realpath(opts.dir);
90088
90261
  return new Extractor(zipPath, opts).extract();
90089
90262
  };
90090
90263
  }
@@ -91461,8 +91634,8 @@ var init_index_node_esm = __esm({
91461
91634
  const resultType = this.currResultType;
91462
91635
  switch (resultType) {
91463
91636
  case "all": {
91464
- const path13 = Array.isArray(ea2.path) ? ea2.path : JSONPath.toPathArray(ea2.path);
91465
- ea2.pointer = JSONPath.toPointer(path13);
91637
+ const path15 = Array.isArray(ea2.path) ? ea2.path : JSONPath.toPathArray(ea2.path);
91638
+ ea2.pointer = JSONPath.toPointer(path15);
91466
91639
  ea2.path = typeof ea2.path === "string" ? ea2.path : JSONPath.toPathString(ea2.path);
91467
91640
  return ea2;
91468
91641
  }
@@ -91485,11 +91658,11 @@ var init_index_node_esm = __esm({
91485
91658
  callback(preferredOutput, type, fullRetObj);
91486
91659
  }
91487
91660
  };
91488
- JSONPath.prototype._trace = function(expr, val, path13, parent, parentPropName, callback, hasArrExpr, literalPriority) {
91661
+ JSONPath.prototype._trace = function(expr, val, path15, parent, parentPropName, callback, hasArrExpr, literalPriority) {
91489
91662
  let retObj;
91490
91663
  if (!expr.length) {
91491
91664
  retObj = {
91492
- path: path13,
91665
+ path: path15,
91493
91666
  value: val,
91494
91667
  parent,
91495
91668
  parentProperty: parentPropName,
@@ -91510,28 +91683,28 @@ var init_index_node_esm = __esm({
91510
91683
  }
91511
91684
  }
91512
91685
  if ((typeof loc !== "string" || literalPriority) && val && Object.hasOwn(val, loc)) {
91513
- addRet(this._trace(x2, val[loc], push(path13, loc), val, loc, callback, hasArrExpr));
91686
+ addRet(this._trace(x2, val[loc], push(path15, loc), val, loc, callback, hasArrExpr));
91514
91687
  } else if (loc === "*") {
91515
91688
  this._walk(val, (m2) => {
91516
- addRet(this._trace(x2, val[m2], push(path13, m2), val, m2, callback, true, true));
91689
+ addRet(this._trace(x2, val[m2], push(path15, m2), val, m2, callback, true, true));
91517
91690
  });
91518
91691
  } else if (loc === "..") {
91519
- addRet(this._trace(x2, val, path13, parent, parentPropName, callback, hasArrExpr));
91692
+ addRet(this._trace(x2, val, path15, parent, parentPropName, callback, hasArrExpr));
91520
91693
  this._walk(val, (m2) => {
91521
91694
  if (typeof val[m2] === "object") {
91522
- addRet(this._trace(expr.slice(), val[m2], push(path13, m2), val, m2, callback, true));
91695
+ addRet(this._trace(expr.slice(), val[m2], push(path15, m2), val, m2, callback, true));
91523
91696
  }
91524
91697
  });
91525
91698
  } else if (loc === "^") {
91526
91699
  this._hasParentSelector = true;
91527
91700
  return {
91528
- path: path13.slice(0, -1),
91701
+ path: path15.slice(0, -1),
91529
91702
  expr: x2,
91530
91703
  isParentSelector: true
91531
91704
  };
91532
91705
  } else if (loc === "~") {
91533
91706
  retObj = {
91534
- path: push(path13, loc),
91707
+ path: push(path15, loc),
91535
91708
  value: parentPropName,
91536
91709
  parent,
91537
91710
  parentProperty: null
@@ -91539,9 +91712,9 @@ var init_index_node_esm = __esm({
91539
91712
  this._handleCallback(retObj, callback, "property");
91540
91713
  return retObj;
91541
91714
  } else if (loc === "$") {
91542
- addRet(this._trace(x2, val, path13, null, null, callback, hasArrExpr));
91715
+ addRet(this._trace(x2, val, path15, null, null, callback, hasArrExpr));
91543
91716
  } else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(loc)) {
91544
- addRet(this._slice(loc, x2, val, path13, parent, parentPropName, callback));
91717
+ addRet(this._slice(loc, x2, val, path15, parent, parentPropName, callback));
91545
91718
  } else if (loc.indexOf("?(") === 0) {
91546
91719
  if (this.currEval === false) {
91547
91720
  throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
@@ -91552,15 +91725,15 @@ var init_index_node_esm = __esm({
91552
91725
  this._walk(val, (m2) => {
91553
91726
  const npath = [nested[2]];
91554
91727
  const nvalue = nested[1] ? val[m2][nested[1]] : val[m2];
91555
- const filterResults = this._trace(npath, nvalue, path13, parent, parentPropName, callback, true);
91728
+ const filterResults = this._trace(npath, nvalue, path15, parent, parentPropName, callback, true);
91556
91729
  if (filterResults.length > 0) {
91557
- addRet(this._trace(x2, val[m2], push(path13, m2), val, m2, callback, true));
91730
+ addRet(this._trace(x2, val[m2], push(path15, m2), val, m2, callback, true));
91558
91731
  }
91559
91732
  });
91560
91733
  } else {
91561
91734
  this._walk(val, (m2) => {
91562
- if (this._eval(safeLoc, val[m2], m2, path13, parent, parentPropName)) {
91563
- addRet(this._trace(x2, val[m2], push(path13, m2), val, m2, callback, true));
91735
+ if (this._eval(safeLoc, val[m2], m2, path15, parent, parentPropName)) {
91736
+ addRet(this._trace(x2, val[m2], push(path15, m2), val, m2, callback, true));
91564
91737
  }
91565
91738
  });
91566
91739
  }
@@ -91568,7 +91741,7 @@ var init_index_node_esm = __esm({
91568
91741
  if (this.currEval === false) {
91569
91742
  throw new Error("Eval [(expr)] prevented in JSONPath expression.");
91570
91743
  }
91571
- addRet(this._trace(unshift(this._eval(loc, val, path13.at(-1), path13.slice(0, -1), parent, parentPropName), x2), val, path13, parent, parentPropName, callback, hasArrExpr));
91744
+ addRet(this._trace(unshift(this._eval(loc, val, path15.at(-1), path15.slice(0, -1), parent, parentPropName), x2), val, path15, parent, parentPropName, callback, hasArrExpr));
91572
91745
  } else if (loc[0] === "@") {
91573
91746
  let addType = false;
91574
91747
  const valueType = loc.slice(1, -2);
@@ -91612,7 +91785,7 @@ var init_index_node_esm = __esm({
91612
91785
  }
91613
91786
  break;
91614
91787
  case "other":
91615
- addType = this.currOtherTypeCallback(val, path13, parent, parentPropName);
91788
+ addType = this.currOtherTypeCallback(val, path15, parent, parentPropName);
91616
91789
  break;
91617
91790
  case "null":
91618
91791
  if (val === null) {
@@ -91625,7 +91798,7 @@ var init_index_node_esm = __esm({
91625
91798
  }
91626
91799
  if (addType) {
91627
91800
  retObj = {
91628
- path: path13,
91801
+ path: path15,
91629
91802
  value: val,
91630
91803
  parent,
91631
91804
  parentProperty: parentPropName
@@ -91635,14 +91808,14 @@ var init_index_node_esm = __esm({
91635
91808
  }
91636
91809
  } else if (loc[0] === "`" && val && Object.hasOwn(val, loc.slice(1))) {
91637
91810
  const locProp = loc.slice(1);
91638
- addRet(this._trace(x2, val[locProp], push(path13, locProp), val, locProp, callback, hasArrExpr, true));
91811
+ addRet(this._trace(x2, val[locProp], push(path15, locProp), val, locProp, callback, hasArrExpr, true));
91639
91812
  } else if (loc.includes(",")) {
91640
91813
  const parts = loc.split(",");
91641
91814
  for (const part of parts) {
91642
- addRet(this._trace(unshift(part, x2), val, path13, parent, parentPropName, callback, true));
91815
+ addRet(this._trace(unshift(part, x2), val, path15, parent, parentPropName, callback, true));
91643
91816
  }
91644
91817
  } else if (!literalPriority && val && Object.hasOwn(val, loc)) {
91645
- addRet(this._trace(x2, val[loc], push(path13, loc), val, loc, callback, hasArrExpr, true));
91818
+ addRet(this._trace(x2, val[loc], push(path15, loc), val, loc, callback, hasArrExpr, true));
91646
91819
  }
91647
91820
  if (this._hasParentSelector) {
91648
91821
  for (let t2 = 0; t2 < ret.length; t2++) {
@@ -91676,7 +91849,7 @@ var init_index_node_esm = __esm({
91676
91849
  });
91677
91850
  }
91678
91851
  };
91679
- JSONPath.prototype._slice = function(loc, expr, val, path13, parent, parentPropName, callback) {
91852
+ JSONPath.prototype._slice = function(loc, expr, val, path15, parent, parentPropName, callback) {
91680
91853
  if (!Array.isArray(val)) {
91681
91854
  return void 0;
91682
91855
  }
@@ -91686,14 +91859,14 @@ var init_index_node_esm = __esm({
91686
91859
  end = end < 0 ? Math.max(0, end + len) : Math.min(len, end);
91687
91860
  const ret = [];
91688
91861
  for (let i2 = start; i2 < end; i2 += step) {
91689
- const tmp = this._trace(unshift(i2, expr), val, path13, parent, parentPropName, callback, true);
91862
+ const tmp = this._trace(unshift(i2, expr), val, path15, parent, parentPropName, callback, true);
91690
91863
  tmp.forEach((t2) => {
91691
91864
  ret.push(t2);
91692
91865
  });
91693
91866
  }
91694
91867
  return ret;
91695
91868
  };
91696
- JSONPath.prototype._eval = function(code, _v, _vname, path13, parent, parentPropName) {
91869
+ JSONPath.prototype._eval = function(code, _v, _vname, path15, parent, parentPropName) {
91697
91870
  this.currSandbox._$_parentProperty = parentPropName;
91698
91871
  this.currSandbox._$_parent = parent;
91699
91872
  this.currSandbox._$_property = _vname;
@@ -91701,7 +91874,7 @@ var init_index_node_esm = __esm({
91701
91874
  this.currSandbox._$_v = _v;
91702
91875
  const containsPath = code.includes("@path");
91703
91876
  if (containsPath) {
91704
- this.currSandbox._$_path = JSONPath.toPathString(path13.concat([_vname]));
91877
+ this.currSandbox._$_path = JSONPath.toPathString(path15.concat([_vname]));
91705
91878
  }
91706
91879
  const scriptCacheKey = this.currEval + "Script:" + code;
91707
91880
  if (!JSONPath.cache[scriptCacheKey]) {
@@ -91784,13 +91957,13 @@ var init_index_node_esm = __esm({
91784
91957
  });
91785
91958
 
91786
91959
  // ../cli-apps/src/helpers/scaffolding/index.ts
91787
- var fs8, os3, path5, import_crypto, import_extract_zip, SeekaAppScaffolder;
91960
+ var fs10, os3, path7, import_crypto, import_extract_zip, SeekaAppScaffolder;
91788
91961
  var init_scaffolding = __esm({
91789
91962
  "../cli-apps/src/helpers/scaffolding/index.ts"() {
91790
91963
  "use strict";
91791
- fs8 = __toESM(require("fs"), 1);
91964
+ fs10 = __toESM(require("fs"), 1);
91792
91965
  os3 = __toESM(require("os"), 1);
91793
- path5 = __toESM(require("path"), 1);
91966
+ path7 = __toESM(require("path"), 1);
91794
91967
  import_crypto = require("crypto");
91795
91968
  init_esm7();
91796
91969
  import_extract_zip = __toESM(require_extract_zip(), 1);
@@ -91799,23 +91972,23 @@ var init_scaffolding = __esm({
91799
91972
  async scaffoldSeekaApp(param) {
91800
91973
  const options = this.loadOptions(param);
91801
91974
  this.validateOptions(options);
91802
- const tempRoot = fs8.mkdtempSync(path5.join(os3.tmpdir(), "seeka-scaffold-"));
91803
- const workingTemplateDir = path5.join(tempRoot, "template");
91975
+ const tempRoot = fs10.mkdtempSync(path7.join(os3.tmpdir(), "seeka-scaffold-"));
91976
+ const workingTemplateDir = path7.join(tempRoot, "template");
91804
91977
  try {
91805
91978
  if (options.templateDir) {
91806
- const srcDir = path5.resolve(options.templateDir);
91979
+ const srcDir = path7.resolve(options.templateDir);
91807
91980
  this.assertExists(srcDir, "templateDir");
91808
- if (!fs8.statSync(srcDir).isDirectory()) {
91981
+ if (!fs10.statSync(srcDir).isDirectory()) {
91809
91982
  throw new Error(`templateDir is not a directory: ${srcDir}`);
91810
91983
  }
91811
- fs8.cpSync(srcDir, workingTemplateDir, { recursive: true });
91984
+ fs10.cpSync(srcDir, workingTemplateDir, { recursive: true });
91812
91985
  } else if (options.templateZip) {
91813
- const zipPath = path5.resolve(options.templateZip);
91986
+ const zipPath = path7.resolve(options.templateZip);
91814
91987
  this.assertExists(zipPath, "templateZip");
91815
- if (!fs8.statSync(zipPath).isFile()) {
91988
+ if (!fs10.statSync(zipPath).isFile()) {
91816
91989
  throw new Error(`templateZip is not a file: ${zipPath}`);
91817
91990
  }
91818
- fs8.mkdirSync(workingTemplateDir, { recursive: true });
91991
+ fs10.mkdirSync(workingTemplateDir, { recursive: true });
91819
91992
  await (0, import_extract_zip.default)(zipPath, { dir: workingTemplateDir });
91820
91993
  }
91821
91994
  this.applyExcludes(workingTemplateDir, options.exclude);
@@ -91826,14 +91999,14 @@ var init_scaffolding = __esm({
91826
91999
  this.applyJsonActions(workingTemplateDir, options.jsonActions || []);
91827
92000
  this.writeToDestination(workingTemplateDir, options.destinationDir, options?.force == true);
91828
92001
  } finally {
91829
- fs8.rmSync(tempRoot, { recursive: true, force: true });
92002
+ fs10.rmSync(tempRoot, { recursive: true, force: true });
91830
92003
  }
91831
92004
  }
91832
92005
  loadOptions(param) {
91833
92006
  if (param?.optionsFilePath) {
91834
- const optionsFilePath = path5.resolve(param.optionsFilePath);
92007
+ const optionsFilePath = path7.resolve(param.optionsFilePath);
91835
92008
  this.assertExists(optionsFilePath, "optionsFilePath");
91836
- const raw = fs8.readFileSync(optionsFilePath, "utf8");
92009
+ const raw = fs10.readFileSync(optionsFilePath, "utf8");
91837
92010
  const parsed = JSON.parse(raw);
91838
92011
  return parsed;
91839
92012
  }
@@ -91849,30 +92022,30 @@ var init_scaffolding = __esm({
91849
92022
  }
91850
92023
  mergeAzureFunctionEnvVars = (workingTemplateDir, env) => {
91851
92024
  if (!env || Object.keys(env).length === 0) return;
91852
- const localSettingsTemplatePath = path5.resolve(workingTemplateDir, "app", "server-azurefunc", "local.settings.template.json");
91853
- const localSettingsPath = path5.resolve(workingTemplateDir, "app", "server-azurefunc", "local.settings.json");
91854
- if (!fs8.existsSync(localSettingsTemplatePath)) {
92025
+ const localSettingsTemplatePath = path7.resolve(workingTemplateDir, "app", "server-azurefunc", "local.settings.template.json");
92026
+ const localSettingsPath = path7.resolve(workingTemplateDir, "app", "server-azurefunc", "local.settings.json");
92027
+ if (!fs10.existsSync(localSettingsTemplatePath)) {
91855
92028
  throw new Error(`local.settings.json not found at ${localSettingsTemplatePath}`);
91856
92029
  }
91857
- fs8.rmSync(localSettingsPath, { force: true });
91858
- fs8.renameSync(localSettingsTemplatePath, localSettingsPath);
92030
+ fs10.rmSync(localSettingsPath, { force: true });
92031
+ fs10.renameSync(localSettingsTemplatePath, localSettingsPath);
91859
92032
  const localSettings = require(localSettingsPath);
91860
92033
  localSettings.Values = {
91861
92034
  ...localSettings.Values || {},
91862
92035
  ...env
91863
92036
  };
91864
- fs8.writeFileSync(localSettingsPath, JSON.stringify(localSettings, null, 2), { encoding: "utf8" });
92037
+ fs10.writeFileSync(localSettingsPath, JSON.stringify(localSettings, null, 2), { encoding: "utf8" });
91865
92038
  };
91866
92039
  organiseForTemplate(workingTemplateDir, options) {
91867
92040
  switch (options.template) {
91868
92041
  case "azure-function": {
91869
92042
  const env = this.withDefaultEnvironmentVariables(options.environmentVariables);
91870
92043
  this.mergeAzureFunctionEnvVars(workingTemplateDir, env);
91871
- const azureFuncDir = path5.join(workingTemplateDir, "app", "server-azurefunc");
91872
- if (!fs8.existsSync(azureFuncDir)) {
92044
+ const azureFuncDir = path7.join(workingTemplateDir, "app", "server-azurefunc");
92045
+ if (!fs10.existsSync(azureFuncDir)) {
91873
92046
  throw new Error("server-azurefunc directory does not exist");
91874
92047
  }
91875
- fs8.renameSync(azureFuncDir, path5.join(workingTemplateDir, "app", "server"));
92048
+ fs10.renameSync(azureFuncDir, path7.join(workingTemplateDir, "app", "server"));
91876
92049
  break;
91877
92050
  }
91878
92051
  default: {
@@ -91894,7 +92067,7 @@ var init_scaffolding = __esm({
91894
92067
  }
91895
92068
  }
91896
92069
  assertExists(p2, name) {
91897
- if (!fs8.existsSync(p2)) {
92070
+ if (!fs10.existsSync(p2)) {
91898
92071
  throw new Error(`${name} does not exist: ${p2}`);
91899
92072
  }
91900
92073
  }
@@ -91926,8 +92099,8 @@ var init_scaffolding = __esm({
91926
92099
  }
91927
92100
  const ordered = Array.from(allMatches).sort((a2, b2) => b2.length - a2.length);
91928
92101
  for (const match2 of ordered) {
91929
- if (!fs8.existsSync(match2)) continue;
91930
- fs8.rmSync(match2, { recursive: true, force: false });
92102
+ if (!fs10.existsSync(match2)) continue;
92103
+ fs10.rmSync(match2, { recursive: true, force: false });
91931
92104
  }
91932
92105
  }
91933
92106
  applyDeletes(rootDir, deletes) {
@@ -91938,8 +92111,8 @@ var init_scaffolding = __esm({
91938
92111
  }
91939
92112
  const ordered = Array.from(new Set(matches)).sort((a2, b2) => b2.length - a2.length);
91940
92113
  for (const match2 of ordered) {
91941
- if (!fs8.existsSync(match2)) continue;
91942
- fs8.rmSync(match2, { recursive: true, force: false });
92114
+ if (!fs10.existsSync(match2)) continue;
92115
+ fs10.rmSync(match2, { recursive: true, force: false });
91943
92116
  }
91944
92117
  }
91945
92118
  }
@@ -91959,30 +92132,30 @@ var init_scaffolding = __esm({
91959
92132
  const multiple = sources.length > 1;
91960
92133
  const containsStar = newPathRelRaw.includes("*");
91961
92134
  for (const sourceAbs of sources) {
91962
- const sourceBase = path5.basename(sourceAbs);
92135
+ const sourceBase = path7.basename(sourceAbs);
91963
92136
  let destRel;
91964
92137
  if (multiple) {
91965
92138
  if (containsStar) {
91966
92139
  destRel = newPathRelRaw.replace(/\*/g, sourceBase);
91967
92140
  } else {
91968
- destRel = path5.join(newPathRelRaw, sourceBase);
92141
+ destRel = path7.join(newPathRelRaw, sourceBase);
91969
92142
  }
91970
92143
  } else {
91971
92144
  destRel = containsStar ? newPathRelRaw.replace(/\*/g, sourceBase) : newPathRelRaw;
91972
92145
  }
91973
- const destAbs = path5.resolve(rootDir, destRel);
91974
- const rootAbs = path5.resolve(rootDir);
91975
- if (destAbs === rootAbs || !destAbs.startsWith(rootAbs + path5.sep)) {
92146
+ const destAbs = path7.resolve(rootDir, destRel);
92147
+ const rootAbs = path7.resolve(rootDir);
92148
+ if (destAbs === rootAbs || !destAbs.startsWith(rootAbs + path7.sep)) {
91976
92149
  throw new Error(`fileRenames newPath resolves outside template root: ${destRel}`);
91977
92150
  }
91978
- if (!fs8.existsSync(sourceAbs)) {
92151
+ if (!fs10.existsSync(sourceAbs)) {
91979
92152
  throw new Error(`fileRenames source does not exist: ${sourceAbs}`);
91980
92153
  }
91981
- if (fs8.existsSync(destAbs)) {
92154
+ if (fs10.existsSync(destAbs)) {
91982
92155
  throw new Error(`fileRenames destination already exists: ${destRel}`);
91983
92156
  }
91984
- fs8.mkdirSync(path5.dirname(destAbs), { recursive: true });
91985
- fs8.renameSync(sourceAbs, destAbs);
92157
+ fs10.mkdirSync(path7.dirname(destAbs), { recursive: true });
92158
+ fs10.renameSync(sourceAbs, destAbs);
91986
92159
  }
91987
92160
  }
91988
92161
  }
@@ -92008,9 +92181,9 @@ var init_scaffolding = __esm({
92008
92181
  }
92009
92182
  const re2 = this.parseFindText(rep.findText);
92010
92183
  for (const fileAbs of matches) {
92011
- const content = fs8.readFileSync(fileAbs, "utf8");
92184
+ const content = fs10.readFileSync(fileAbs, "utf8");
92012
92185
  const updated = content.replace(re2, rep.replaceText);
92013
- fs8.writeFileSync(fileAbs, updated);
92186
+ fs10.writeFileSync(fileAbs, updated);
92014
92187
  }
92015
92188
  }
92016
92189
  }
@@ -92070,7 +92243,7 @@ var init_scaffolding = __esm({
92070
92243
  throw new Error(`jsonActions sourcePath did not resolve: ${action.sourcePath}`);
92071
92244
  }
92072
92245
  for (const fileAbs of files) {
92073
- const raw = fs8.readFileSync(fileAbs, "utf8");
92246
+ const raw = fs10.readFileSync(fileAbs, "utf8");
92074
92247
  let json;
92075
92248
  try {
92076
92249
  json = JSON.parse(raw);
@@ -92095,7 +92268,7 @@ var init_scaffolding = __esm({
92095
92268
  continue;
92096
92269
  }
92097
92270
  throw new Error(
92098
- `jsonActions jsonPath did not resolve in file ${path5.join(rootDir, fileAbs)}: ${action.jsonPath}`
92271
+ `jsonActions jsonPath did not resolve in file ${path7.join(rootDir, fileAbs)}: ${action.jsonPath}`
92099
92272
  );
92100
92273
  }
92101
92274
  let updated = json;
@@ -92127,13 +92300,13 @@ var init_scaffolding = __esm({
92127
92300
  updated = this.deleteByJsonPointer(updated, ptr);
92128
92301
  }
92129
92302
  }
92130
- fs8.writeFileSync(fileAbs, JSON.stringify(updated, null, 2));
92303
+ fs10.writeFileSync(fileAbs, JSON.stringify(updated, null, 2));
92131
92304
  }
92132
92305
  }
92133
92306
  }
92134
92307
  isEmptyDir(dirPath) {
92135
92308
  try {
92136
- const directory = fs8.opendirSync(dirPath);
92309
+ const directory = fs10.opendirSync(dirPath);
92137
92310
  const entry = directory.readSync();
92138
92311
  directory.closeSync();
92139
92312
  return entry === null;
@@ -92142,18 +92315,18 @@ var init_scaffolding = __esm({
92142
92315
  }
92143
92316
  }
92144
92317
  writeToDestination(rootDir, destinationDir, allowNonEmpty) {
92145
- const destAbs = path5.resolve(destinationDir);
92146
- if (fs8.existsSync(destAbs)) {
92147
- if (!fs8.statSync(destAbs).isDirectory()) {
92318
+ const destAbs = path7.resolve(destinationDir);
92319
+ if (fs10.existsSync(destAbs)) {
92320
+ if (!fs10.statSync(destAbs).isDirectory()) {
92148
92321
  throw new Error(`destinationDir exists but is not a directory: ${destAbs}`);
92149
92322
  }
92150
92323
  if (!allowNonEmpty && !this.isEmptyDir(destAbs)) {
92151
92324
  throw new Error(`destinationDir is not empty: ${destAbs}`);
92152
92325
  }
92153
92326
  } else {
92154
- fs8.mkdirSync(destAbs, { recursive: true });
92327
+ fs10.mkdirSync(destAbs, { recursive: true });
92155
92328
  }
92156
- fs8.cpSync(rootDir, destAbs, { recursive: true });
92329
+ fs10.cpSync(rootDir, destAbs, { recursive: true });
92157
92330
  }
92158
92331
  };
92159
92332
  }
@@ -92440,7 +92613,7 @@ var require_BufferList = __commonJS({
92440
92613
  this.head = this.tail = null;
92441
92614
  this.length = 0;
92442
92615
  };
92443
- BufferList.prototype.join = function join8(s2) {
92616
+ BufferList.prototype.join = function join10(s2) {
92444
92617
  if (this.length === 0) return "";
92445
92618
  var p2 = this.head;
92446
92619
  var ret = "" + p2.data;
@@ -95027,8 +95200,8 @@ var require_utils2 = __commonJS({
95027
95200
  var result = transform[inputType][outputType](input);
95028
95201
  return result;
95029
95202
  };
95030
- exports2.resolve = function(path13) {
95031
- var parts = path13.split("/");
95203
+ exports2.resolve = function(path15) {
95204
+ var parts = path15.split("/");
95032
95205
  var result = [];
95033
95206
  for (var index2 = 0; index2 < parts.length; index2++) {
95034
95207
  var part = parts[index2];
@@ -100881,18 +101054,18 @@ var require_object = __commonJS({
100881
101054
  var object = new ZipObject(name, zipObjectContent, o2);
100882
101055
  this.files[name] = object;
100883
101056
  };
100884
- var parentFolder = function(path13) {
100885
- if (path13.slice(-1) === "/") {
100886
- path13 = path13.substring(0, path13.length - 1);
101057
+ var parentFolder = function(path15) {
101058
+ if (path15.slice(-1) === "/") {
101059
+ path15 = path15.substring(0, path15.length - 1);
100887
101060
  }
100888
- var lastSlash = path13.lastIndexOf("/");
100889
- return lastSlash > 0 ? path13.substring(0, lastSlash) : "";
101061
+ var lastSlash = path15.lastIndexOf("/");
101062
+ return lastSlash > 0 ? path15.substring(0, lastSlash) : "";
100890
101063
  };
100891
- var forceTrailingSlash = function(path13) {
100892
- if (path13.slice(-1) !== "/") {
100893
- path13 += "/";
101064
+ var forceTrailingSlash = function(path15) {
101065
+ if (path15.slice(-1) !== "/") {
101066
+ path15 += "/";
100894
101067
  }
100895
- return path13;
101068
+ return path15;
100896
101069
  };
100897
101070
  var folderAdd = function(name, createFolders) {
100898
101071
  createFolders = typeof createFolders !== "undefined" ? createFolders : defaults2.createFolders;
@@ -101896,26 +102069,26 @@ async function extractZipToDirectory(zipBuffer, destDir) {
101896
102069
  const zip = await import_jszip.default.loadAsync(zipBuffer);
101897
102070
  const entries = Object.entries(zip.files);
101898
102071
  for (const [relativePath, zipEntry] of entries) {
101899
- const destPath = path6.join(destDir, relativePath);
102072
+ const destPath = path8.join(destDir, relativePath);
101900
102073
  if (zipEntry.dir) {
101901
- fs9.mkdirSync(destPath, { recursive: true });
102074
+ fs11.mkdirSync(destPath, { recursive: true });
101902
102075
  } else {
101903
- fs9.mkdirSync(path6.dirname(destPath), { recursive: true });
102076
+ fs11.mkdirSync(path8.dirname(destPath), { recursive: true });
101904
102077
  const content = await zipEntry.async("nodebuffer");
101905
- fs9.writeFileSync(destPath, content);
102078
+ fs11.writeFileSync(destPath, content);
101906
102079
  }
101907
102080
  }
101908
102081
  }
101909
102082
  async function extractZipFileToDirectory(zipPath, destDir) {
101910
- const zipBuffer = fs9.readFileSync(zipPath);
102083
+ const zipBuffer = fs11.readFileSync(zipPath);
101911
102084
  await extractZipToDirectory(zipBuffer, destDir);
101912
102085
  }
101913
- var fs9, path6, import_jszip;
102086
+ var fs11, path8, import_jszip;
101914
102087
  var init_zip = __esm({
101915
102088
  "../cli-apps/src/helpers/zip.ts"() {
101916
102089
  "use strict";
101917
- fs9 = __toESM(require("fs"), 1);
101918
- path6 = __toESM(require("path"), 1);
102090
+ fs11 = __toESM(require("fs"), 1);
102091
+ path8 = __toESM(require("path"), 1);
101919
102092
  import_jszip = __toESM(require_lib6(), 1);
101920
102093
  }
101921
102094
  });
@@ -101974,54 +102147,54 @@ var require_polyfills = __commonJS({
101974
102147
  }
101975
102148
  var chdir;
101976
102149
  module2.exports = patch;
101977
- function patch(fs16) {
102150
+ function patch(fs18) {
101978
102151
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
101979
- patchLchmod(fs16);
101980
- }
101981
- if (!fs16.lutimes) {
101982
- patchLutimes(fs16);
101983
- }
101984
- fs16.chown = chownFix(fs16.chown);
101985
- fs16.fchown = chownFix(fs16.fchown);
101986
- fs16.lchown = chownFix(fs16.lchown);
101987
- fs16.chmod = chmodFix(fs16.chmod);
101988
- fs16.fchmod = chmodFix(fs16.fchmod);
101989
- fs16.lchmod = chmodFix(fs16.lchmod);
101990
- fs16.chownSync = chownFixSync(fs16.chownSync);
101991
- fs16.fchownSync = chownFixSync(fs16.fchownSync);
101992
- fs16.lchownSync = chownFixSync(fs16.lchownSync);
101993
- fs16.chmodSync = chmodFixSync(fs16.chmodSync);
101994
- fs16.fchmodSync = chmodFixSync(fs16.fchmodSync);
101995
- fs16.lchmodSync = chmodFixSync(fs16.lchmodSync);
101996
- fs16.stat = statFix(fs16.stat);
101997
- fs16.fstat = statFix(fs16.fstat);
101998
- fs16.lstat = statFix(fs16.lstat);
101999
- fs16.statSync = statFixSync(fs16.statSync);
102000
- fs16.fstatSync = statFixSync(fs16.fstatSync);
102001
- fs16.lstatSync = statFixSync(fs16.lstatSync);
102002
- if (fs16.chmod && !fs16.lchmod) {
102003
- fs16.lchmod = function(path13, mode, cb) {
102152
+ patchLchmod(fs18);
102153
+ }
102154
+ if (!fs18.lutimes) {
102155
+ patchLutimes(fs18);
102156
+ }
102157
+ fs18.chown = chownFix(fs18.chown);
102158
+ fs18.fchown = chownFix(fs18.fchown);
102159
+ fs18.lchown = chownFix(fs18.lchown);
102160
+ fs18.chmod = chmodFix(fs18.chmod);
102161
+ fs18.fchmod = chmodFix(fs18.fchmod);
102162
+ fs18.lchmod = chmodFix(fs18.lchmod);
102163
+ fs18.chownSync = chownFixSync(fs18.chownSync);
102164
+ fs18.fchownSync = chownFixSync(fs18.fchownSync);
102165
+ fs18.lchownSync = chownFixSync(fs18.lchownSync);
102166
+ fs18.chmodSync = chmodFixSync(fs18.chmodSync);
102167
+ fs18.fchmodSync = chmodFixSync(fs18.fchmodSync);
102168
+ fs18.lchmodSync = chmodFixSync(fs18.lchmodSync);
102169
+ fs18.stat = statFix(fs18.stat);
102170
+ fs18.fstat = statFix(fs18.fstat);
102171
+ fs18.lstat = statFix(fs18.lstat);
102172
+ fs18.statSync = statFixSync(fs18.statSync);
102173
+ fs18.fstatSync = statFixSync(fs18.fstatSync);
102174
+ fs18.lstatSync = statFixSync(fs18.lstatSync);
102175
+ if (fs18.chmod && !fs18.lchmod) {
102176
+ fs18.lchmod = function(path15, mode, cb) {
102004
102177
  if (cb) process.nextTick(cb);
102005
102178
  };
102006
- fs16.lchmodSync = function() {
102179
+ fs18.lchmodSync = function() {
102007
102180
  };
102008
102181
  }
102009
- if (fs16.chown && !fs16.lchown) {
102010
- fs16.lchown = function(path13, uid, gid, cb) {
102182
+ if (fs18.chown && !fs18.lchown) {
102183
+ fs18.lchown = function(path15, uid, gid, cb) {
102011
102184
  if (cb) process.nextTick(cb);
102012
102185
  };
102013
- fs16.lchownSync = function() {
102186
+ fs18.lchownSync = function() {
102014
102187
  };
102015
102188
  }
102016
102189
  if (platform2 === "win32") {
102017
- fs16.rename = typeof fs16.rename !== "function" ? fs16.rename : (function(fs$rename) {
102190
+ fs18.rename = typeof fs18.rename !== "function" ? fs18.rename : (function(fs$rename) {
102018
102191
  function rename(from2, to, cb) {
102019
102192
  var start = Date.now();
102020
102193
  var backoff = 0;
102021
102194
  fs$rename(from2, to, function CB(er2) {
102022
102195
  if (er2 && (er2.code === "EACCES" || er2.code === "EPERM" || er2.code === "EBUSY") && Date.now() - start < 6e4) {
102023
102196
  setTimeout(function() {
102024
- fs16.stat(to, function(stater, st2) {
102197
+ fs18.stat(to, function(stater, st2) {
102025
102198
  if (stater && stater.code === "ENOENT")
102026
102199
  fs$rename(from2, to, CB);
102027
102200
  else
@@ -102037,9 +102210,9 @@ var require_polyfills = __commonJS({
102037
102210
  }
102038
102211
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
102039
102212
  return rename;
102040
- })(fs16.rename);
102213
+ })(fs18.rename);
102041
102214
  }
102042
- fs16.read = typeof fs16.read !== "function" ? fs16.read : (function(fs$read) {
102215
+ fs18.read = typeof fs18.read !== "function" ? fs18.read : (function(fs$read) {
102043
102216
  function read(fd, buffer, offset, length, position, callback_) {
102044
102217
  var callback;
102045
102218
  if (callback_ && typeof callback_ === "function") {
@@ -102047,22 +102220,22 @@ var require_polyfills = __commonJS({
102047
102220
  callback = function(er2, _3, __) {
102048
102221
  if (er2 && er2.code === "EAGAIN" && eagCounter < 10) {
102049
102222
  eagCounter++;
102050
- return fs$read.call(fs16, fd, buffer, offset, length, position, callback);
102223
+ return fs$read.call(fs18, fd, buffer, offset, length, position, callback);
102051
102224
  }
102052
102225
  callback_.apply(this, arguments);
102053
102226
  };
102054
102227
  }
102055
- return fs$read.call(fs16, fd, buffer, offset, length, position, callback);
102228
+ return fs$read.call(fs18, fd, buffer, offset, length, position, callback);
102056
102229
  }
102057
102230
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
102058
102231
  return read;
102059
- })(fs16.read);
102060
- fs16.readSync = typeof fs16.readSync !== "function" ? fs16.readSync : /* @__PURE__ */ (function(fs$readSync) {
102232
+ })(fs18.read);
102233
+ fs18.readSync = typeof fs18.readSync !== "function" ? fs18.readSync : /* @__PURE__ */ (function(fs$readSync) {
102061
102234
  return function(fd, buffer, offset, length, position) {
102062
102235
  var eagCounter = 0;
102063
102236
  while (true) {
102064
102237
  try {
102065
- return fs$readSync.call(fs16, fd, buffer, offset, length, position);
102238
+ return fs$readSync.call(fs18, fd, buffer, offset, length, position);
102066
102239
  } catch (er2) {
102067
102240
  if (er2.code === "EAGAIN" && eagCounter < 10) {
102068
102241
  eagCounter++;
@@ -102072,11 +102245,11 @@ var require_polyfills = __commonJS({
102072
102245
  }
102073
102246
  }
102074
102247
  };
102075
- })(fs16.readSync);
102076
- function patchLchmod(fs17) {
102077
- fs17.lchmod = function(path13, mode, callback) {
102078
- fs17.open(
102079
- path13,
102248
+ })(fs18.readSync);
102249
+ function patchLchmod(fs19) {
102250
+ fs19.lchmod = function(path15, mode, callback) {
102251
+ fs19.open(
102252
+ path15,
102080
102253
  constants.O_WRONLY | constants.O_SYMLINK,
102081
102254
  mode,
102082
102255
  function(err, fd) {
@@ -102084,80 +102257,80 @@ var require_polyfills = __commonJS({
102084
102257
  if (callback) callback(err);
102085
102258
  return;
102086
102259
  }
102087
- fs17.fchmod(fd, mode, function(err2) {
102088
- fs17.close(fd, function(err22) {
102260
+ fs19.fchmod(fd, mode, function(err2) {
102261
+ fs19.close(fd, function(err22) {
102089
102262
  if (callback) callback(err2 || err22);
102090
102263
  });
102091
102264
  });
102092
102265
  }
102093
102266
  );
102094
102267
  };
102095
- fs17.lchmodSync = function(path13, mode) {
102096
- var fd = fs17.openSync(path13, constants.O_WRONLY | constants.O_SYMLINK, mode);
102268
+ fs19.lchmodSync = function(path15, mode) {
102269
+ var fd = fs19.openSync(path15, constants.O_WRONLY | constants.O_SYMLINK, mode);
102097
102270
  var threw = true;
102098
102271
  var ret;
102099
102272
  try {
102100
- ret = fs17.fchmodSync(fd, mode);
102273
+ ret = fs19.fchmodSync(fd, mode);
102101
102274
  threw = false;
102102
102275
  } finally {
102103
102276
  if (threw) {
102104
102277
  try {
102105
- fs17.closeSync(fd);
102278
+ fs19.closeSync(fd);
102106
102279
  } catch (er2) {
102107
102280
  }
102108
102281
  } else {
102109
- fs17.closeSync(fd);
102282
+ fs19.closeSync(fd);
102110
102283
  }
102111
102284
  }
102112
102285
  return ret;
102113
102286
  };
102114
102287
  }
102115
- function patchLutimes(fs17) {
102116
- if (constants.hasOwnProperty("O_SYMLINK") && fs17.futimes) {
102117
- fs17.lutimes = function(path13, at2, mt2, cb) {
102118
- fs17.open(path13, constants.O_SYMLINK, function(er2, fd) {
102288
+ function patchLutimes(fs19) {
102289
+ if (constants.hasOwnProperty("O_SYMLINK") && fs19.futimes) {
102290
+ fs19.lutimes = function(path15, at2, mt2, cb) {
102291
+ fs19.open(path15, constants.O_SYMLINK, function(er2, fd) {
102119
102292
  if (er2) {
102120
102293
  if (cb) cb(er2);
102121
102294
  return;
102122
102295
  }
102123
- fs17.futimes(fd, at2, mt2, function(er3) {
102124
- fs17.close(fd, function(er22) {
102296
+ fs19.futimes(fd, at2, mt2, function(er3) {
102297
+ fs19.close(fd, function(er22) {
102125
102298
  if (cb) cb(er3 || er22);
102126
102299
  });
102127
102300
  });
102128
102301
  });
102129
102302
  };
102130
- fs17.lutimesSync = function(path13, at2, mt2) {
102131
- var fd = fs17.openSync(path13, constants.O_SYMLINK);
102303
+ fs19.lutimesSync = function(path15, at2, mt2) {
102304
+ var fd = fs19.openSync(path15, constants.O_SYMLINK);
102132
102305
  var ret;
102133
102306
  var threw = true;
102134
102307
  try {
102135
- ret = fs17.futimesSync(fd, at2, mt2);
102308
+ ret = fs19.futimesSync(fd, at2, mt2);
102136
102309
  threw = false;
102137
102310
  } finally {
102138
102311
  if (threw) {
102139
102312
  try {
102140
- fs17.closeSync(fd);
102313
+ fs19.closeSync(fd);
102141
102314
  } catch (er2) {
102142
102315
  }
102143
102316
  } else {
102144
- fs17.closeSync(fd);
102317
+ fs19.closeSync(fd);
102145
102318
  }
102146
102319
  }
102147
102320
  return ret;
102148
102321
  };
102149
- } else if (fs17.futimes) {
102150
- fs17.lutimes = function(_a2, _b, _c, cb) {
102322
+ } else if (fs19.futimes) {
102323
+ fs19.lutimes = function(_a2, _b, _c, cb) {
102151
102324
  if (cb) process.nextTick(cb);
102152
102325
  };
102153
- fs17.lutimesSync = function() {
102326
+ fs19.lutimesSync = function() {
102154
102327
  };
102155
102328
  }
102156
102329
  }
102157
102330
  function chmodFix(orig) {
102158
102331
  if (!orig) return orig;
102159
102332
  return function(target, mode, cb) {
102160
- return orig.call(fs16, target, mode, function(er2) {
102333
+ return orig.call(fs18, target, mode, function(er2) {
102161
102334
  if (chownErOk(er2)) er2 = null;
102162
102335
  if (cb) cb.apply(this, arguments);
102163
102336
  });
@@ -102167,7 +102340,7 @@ var require_polyfills = __commonJS({
102167
102340
  if (!orig) return orig;
102168
102341
  return function(target, mode) {
102169
102342
  try {
102170
- return orig.call(fs16, target, mode);
102343
+ return orig.call(fs18, target, mode);
102171
102344
  } catch (er2) {
102172
102345
  if (!chownErOk(er2)) throw er2;
102173
102346
  }
@@ -102176,7 +102349,7 @@ var require_polyfills = __commonJS({
102176
102349
  function chownFix(orig) {
102177
102350
  if (!orig) return orig;
102178
102351
  return function(target, uid, gid, cb) {
102179
- return orig.call(fs16, target, uid, gid, function(er2) {
102352
+ return orig.call(fs18, target, uid, gid, function(er2) {
102180
102353
  if (chownErOk(er2)) er2 = null;
102181
102354
  if (cb) cb.apply(this, arguments);
102182
102355
  });
@@ -102186,7 +102359,7 @@ var require_polyfills = __commonJS({
102186
102359
  if (!orig) return orig;
102187
102360
  return function(target, uid, gid) {
102188
102361
  try {
102189
- return orig.call(fs16, target, uid, gid);
102362
+ return orig.call(fs18, target, uid, gid);
102190
102363
  } catch (er2) {
102191
102364
  if (!chownErOk(er2)) throw er2;
102192
102365
  }
@@ -102206,13 +102379,13 @@ var require_polyfills = __commonJS({
102206
102379
  }
102207
102380
  if (cb) cb.apply(this, arguments);
102208
102381
  }
102209
- return options ? orig.call(fs16, target, options, callback) : orig.call(fs16, target, callback);
102382
+ return options ? orig.call(fs18, target, options, callback) : orig.call(fs18, target, callback);
102210
102383
  };
102211
102384
  }
102212
102385
  function statFixSync(orig) {
102213
102386
  if (!orig) return orig;
102214
102387
  return function(target, options) {
102215
- var stats = options ? orig.call(fs16, target, options) : orig.call(fs16, target);
102388
+ var stats = options ? orig.call(fs18, target, options) : orig.call(fs18, target);
102216
102389
  if (stats) {
102217
102390
  if (stats.uid < 0) stats.uid += 4294967296;
102218
102391
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -102241,16 +102414,16 @@ var require_legacy_streams = __commonJS({
102241
102414
  "../../node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
102242
102415
  var Stream2 = require("stream").Stream;
102243
102416
  module2.exports = legacy;
102244
- function legacy(fs16) {
102417
+ function legacy(fs18) {
102245
102418
  return {
102246
102419
  ReadStream,
102247
102420
  WriteStream
102248
102421
  };
102249
- function ReadStream(path13, options) {
102250
- if (!(this instanceof ReadStream)) return new ReadStream(path13, options);
102422
+ function ReadStream(path15, options) {
102423
+ if (!(this instanceof ReadStream)) return new ReadStream(path15, options);
102251
102424
  Stream2.call(this);
102252
102425
  var self2 = this;
102253
- this.path = path13;
102426
+ this.path = path15;
102254
102427
  this.fd = null;
102255
102428
  this.readable = true;
102256
102429
  this.paused = false;
@@ -102284,7 +102457,7 @@ var require_legacy_streams = __commonJS({
102284
102457
  });
102285
102458
  return;
102286
102459
  }
102287
- fs16.open(this.path, this.flags, this.mode, function(err, fd) {
102460
+ fs18.open(this.path, this.flags, this.mode, function(err, fd) {
102288
102461
  if (err) {
102289
102462
  self2.emit("error", err);
102290
102463
  self2.readable = false;
@@ -102295,10 +102468,10 @@ var require_legacy_streams = __commonJS({
102295
102468
  self2._read();
102296
102469
  });
102297
102470
  }
102298
- function WriteStream(path13, options) {
102299
- if (!(this instanceof WriteStream)) return new WriteStream(path13, options);
102471
+ function WriteStream(path15, options) {
102472
+ if (!(this instanceof WriteStream)) return new WriteStream(path15, options);
102300
102473
  Stream2.call(this);
102301
- this.path = path13;
102474
+ this.path = path15;
102302
102475
  this.fd = null;
102303
102476
  this.writable = true;
102304
102477
  this.flags = "w";
@@ -102323,7 +102496,7 @@ var require_legacy_streams = __commonJS({
102323
102496
  this.busy = false;
102324
102497
  this._queue = [];
102325
102498
  if (this.fd === null) {
102326
- this._open = fs16.open;
102499
+ this._open = fs18.open;
102327
102500
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
102328
102501
  this.flush();
102329
102502
  }
@@ -102358,7 +102531,7 @@ var require_clone = __commonJS({
102358
102531
  // ../../node_modules/graceful-fs/graceful-fs.js
102359
102532
  var require_graceful_fs = __commonJS({
102360
102533
  "../../node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
102361
- var fs16 = require("fs");
102534
+ var fs18 = require("fs");
102362
102535
  var polyfills = require_polyfills();
102363
102536
  var legacy = require_legacy_streams();
102364
102537
  var clone = require_clone();
@@ -102390,12 +102563,12 @@ var require_graceful_fs = __commonJS({
102390
102563
  m2 = "GFS4: " + m2.split(/\n/).join("\nGFS4: ");
102391
102564
  console.error(m2);
102392
102565
  };
102393
- if (!fs16[gracefulQueue]) {
102566
+ if (!fs18[gracefulQueue]) {
102394
102567
  queue = global[gracefulQueue] || [];
102395
- publishQueue(fs16, queue);
102396
- fs16.close = (function(fs$close) {
102568
+ publishQueue(fs18, queue);
102569
+ fs18.close = (function(fs$close) {
102397
102570
  function close(fd, cb) {
102398
- return fs$close.call(fs16, fd, function(err) {
102571
+ return fs$close.call(fs18, fd, function(err) {
102399
102572
  if (!err) {
102400
102573
  resetQueue();
102401
102574
  }
@@ -102407,48 +102580,48 @@ var require_graceful_fs = __commonJS({
102407
102580
  value: fs$close
102408
102581
  });
102409
102582
  return close;
102410
- })(fs16.close);
102411
- fs16.closeSync = (function(fs$closeSync) {
102583
+ })(fs18.close);
102584
+ fs18.closeSync = (function(fs$closeSync) {
102412
102585
  function closeSync(fd) {
102413
- fs$closeSync.apply(fs16, arguments);
102586
+ fs$closeSync.apply(fs18, arguments);
102414
102587
  resetQueue();
102415
102588
  }
102416
102589
  Object.defineProperty(closeSync, previousSymbol, {
102417
102590
  value: fs$closeSync
102418
102591
  });
102419
102592
  return closeSync;
102420
- })(fs16.closeSync);
102593
+ })(fs18.closeSync);
102421
102594
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
102422
102595
  process.on("exit", function() {
102423
- debug(fs16[gracefulQueue]);
102424
- require("assert").equal(fs16[gracefulQueue].length, 0);
102596
+ debug(fs18[gracefulQueue]);
102597
+ require("assert").equal(fs18[gracefulQueue].length, 0);
102425
102598
  });
102426
102599
  }
102427
102600
  }
102428
102601
  var queue;
102429
102602
  if (!global[gracefulQueue]) {
102430
- publishQueue(global, fs16[gracefulQueue]);
102431
- }
102432
- module2.exports = patch(clone(fs16));
102433
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs16.__patched) {
102434
- module2.exports = patch(fs16);
102435
- fs16.__patched = true;
102436
- }
102437
- function patch(fs17) {
102438
- polyfills(fs17);
102439
- fs17.gracefulify = patch;
102440
- fs17.createReadStream = createReadStream;
102441
- fs17.createWriteStream = createWriteStream;
102442
- var fs$readFile = fs17.readFile;
102443
- fs17.readFile = readFile;
102444
- function readFile(path13, options, cb) {
102603
+ publishQueue(global, fs18[gracefulQueue]);
102604
+ }
102605
+ module2.exports = patch(clone(fs18));
102606
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs18.__patched) {
102607
+ module2.exports = patch(fs18);
102608
+ fs18.__patched = true;
102609
+ }
102610
+ function patch(fs19) {
102611
+ polyfills(fs19);
102612
+ fs19.gracefulify = patch;
102613
+ fs19.createReadStream = createReadStream;
102614
+ fs19.createWriteStream = createWriteStream;
102615
+ var fs$readFile = fs19.readFile;
102616
+ fs19.readFile = readFile;
102617
+ function readFile(path15, options, cb) {
102445
102618
  if (typeof options === "function")
102446
102619
  cb = options, options = null;
102447
- return go$readFile(path13, options, cb);
102448
- function go$readFile(path14, options2, cb2, startTime) {
102449
- return fs$readFile(path14, options2, function(err) {
102620
+ return go$readFile(path15, options, cb);
102621
+ function go$readFile(path16, options2, cb2, startTime) {
102622
+ return fs$readFile(path16, options2, function(err) {
102450
102623
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
102451
- enqueue([go$readFile, [path14, options2, cb2], err, startTime || Date.now(), Date.now()]);
102624
+ enqueue([go$readFile, [path16, options2, cb2], err, startTime || Date.now(), Date.now()]);
102452
102625
  else {
102453
102626
  if (typeof cb2 === "function")
102454
102627
  cb2.apply(this, arguments);
@@ -102456,16 +102629,16 @@ var require_graceful_fs = __commonJS({
102456
102629
  });
102457
102630
  }
102458
102631
  }
102459
- var fs$writeFile = fs17.writeFile;
102460
- fs17.writeFile = writeFile;
102461
- function writeFile(path13, data, options, cb) {
102632
+ var fs$writeFile = fs19.writeFile;
102633
+ fs19.writeFile = writeFile;
102634
+ function writeFile(path15, data, options, cb) {
102462
102635
  if (typeof options === "function")
102463
102636
  cb = options, options = null;
102464
- return go$writeFile(path13, data, options, cb);
102465
- function go$writeFile(path14, data2, options2, cb2, startTime) {
102466
- return fs$writeFile(path14, data2, options2, function(err) {
102637
+ return go$writeFile(path15, data, options, cb);
102638
+ function go$writeFile(path16, data2, options2, cb2, startTime) {
102639
+ return fs$writeFile(path16, data2, options2, function(err) {
102467
102640
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
102468
- enqueue([go$writeFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
102641
+ enqueue([go$writeFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
102469
102642
  else {
102470
102643
  if (typeof cb2 === "function")
102471
102644
  cb2.apply(this, arguments);
@@ -102473,17 +102646,17 @@ var require_graceful_fs = __commonJS({
102473
102646
  });
102474
102647
  }
102475
102648
  }
102476
- var fs$appendFile = fs17.appendFile;
102649
+ var fs$appendFile = fs19.appendFile;
102477
102650
  if (fs$appendFile)
102478
- fs17.appendFile = appendFile;
102479
- function appendFile(path13, data, options, cb) {
102651
+ fs19.appendFile = appendFile;
102652
+ function appendFile(path15, data, options, cb) {
102480
102653
  if (typeof options === "function")
102481
102654
  cb = options, options = null;
102482
- return go$appendFile(path13, data, options, cb);
102483
- function go$appendFile(path14, data2, options2, cb2, startTime) {
102484
- return fs$appendFile(path14, data2, options2, function(err) {
102655
+ return go$appendFile(path15, data, options, cb);
102656
+ function go$appendFile(path16, data2, options2, cb2, startTime) {
102657
+ return fs$appendFile(path16, data2, options2, function(err) {
102485
102658
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
102486
- enqueue([go$appendFile, [path14, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
102659
+ enqueue([go$appendFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
102487
102660
  else {
102488
102661
  if (typeof cb2 === "function")
102489
102662
  cb2.apply(this, arguments);
@@ -102491,9 +102664,9 @@ var require_graceful_fs = __commonJS({
102491
102664
  });
102492
102665
  }
102493
102666
  }
102494
- var fs$copyFile = fs17.copyFile;
102667
+ var fs$copyFile = fs19.copyFile;
102495
102668
  if (fs$copyFile)
102496
- fs17.copyFile = copyFile;
102669
+ fs19.copyFile = copyFile;
102497
102670
  function copyFile(src, dest, flags, cb) {
102498
102671
  if (typeof flags === "function") {
102499
102672
  cb = flags;
@@ -102511,34 +102684,34 @@ var require_graceful_fs = __commonJS({
102511
102684
  });
102512
102685
  }
102513
102686
  }
102514
- var fs$readdir = fs17.readdir;
102515
- fs17.readdir = readdir2;
102687
+ var fs$readdir = fs19.readdir;
102688
+ fs19.readdir = readdir2;
102516
102689
  var noReaddirOptionVersions = /^v[0-5]\./;
102517
- function readdir2(path13, options, cb) {
102690
+ function readdir2(path15, options, cb) {
102518
102691
  if (typeof options === "function")
102519
102692
  cb = options, options = null;
102520
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path14, options2, cb2, startTime) {
102521
- return fs$readdir(path14, fs$readdirCallback(
102522
- path14,
102693
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path16, options2, cb2, startTime) {
102694
+ return fs$readdir(path16, fs$readdirCallback(
102695
+ path16,
102523
102696
  options2,
102524
102697
  cb2,
102525
102698
  startTime
102526
102699
  ));
102527
- } : function go$readdir2(path14, options2, cb2, startTime) {
102528
- return fs$readdir(path14, options2, fs$readdirCallback(
102529
- path14,
102700
+ } : function go$readdir2(path16, options2, cb2, startTime) {
102701
+ return fs$readdir(path16, options2, fs$readdirCallback(
102702
+ path16,
102530
102703
  options2,
102531
102704
  cb2,
102532
102705
  startTime
102533
102706
  ));
102534
102707
  };
102535
- return go$readdir(path13, options, cb);
102536
- function fs$readdirCallback(path14, options2, cb2, startTime) {
102708
+ return go$readdir(path15, options, cb);
102709
+ function fs$readdirCallback(path16, options2, cb2, startTime) {
102537
102710
  return function(err, files) {
102538
102711
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
102539
102712
  enqueue([
102540
102713
  go$readdir,
102541
- [path14, options2, cb2],
102714
+ [path16, options2, cb2],
102542
102715
  err,
102543
102716
  startTime || Date.now(),
102544
102717
  Date.now()
@@ -102553,21 +102726,21 @@ var require_graceful_fs = __commonJS({
102553
102726
  }
102554
102727
  }
102555
102728
  if (process.version.substr(0, 4) === "v0.8") {
102556
- var legStreams = legacy(fs17);
102729
+ var legStreams = legacy(fs19);
102557
102730
  ReadStream = legStreams.ReadStream;
102558
102731
  WriteStream = legStreams.WriteStream;
102559
102732
  }
102560
- var fs$ReadStream = fs17.ReadStream;
102733
+ var fs$ReadStream = fs19.ReadStream;
102561
102734
  if (fs$ReadStream) {
102562
102735
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
102563
102736
  ReadStream.prototype.open = ReadStream$open;
102564
102737
  }
102565
- var fs$WriteStream = fs17.WriteStream;
102738
+ var fs$WriteStream = fs19.WriteStream;
102566
102739
  if (fs$WriteStream) {
102567
102740
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
102568
102741
  WriteStream.prototype.open = WriteStream$open;
102569
102742
  }
102570
- Object.defineProperty(fs17, "ReadStream", {
102743
+ Object.defineProperty(fs19, "ReadStream", {
102571
102744
  get: function() {
102572
102745
  return ReadStream;
102573
102746
  },
@@ -102577,7 +102750,7 @@ var require_graceful_fs = __commonJS({
102577
102750
  enumerable: true,
102578
102751
  configurable: true
102579
102752
  });
102580
- Object.defineProperty(fs17, "WriteStream", {
102753
+ Object.defineProperty(fs19, "WriteStream", {
102581
102754
  get: function() {
102582
102755
  return WriteStream;
102583
102756
  },
@@ -102588,7 +102761,7 @@ var require_graceful_fs = __commonJS({
102588
102761
  configurable: true
102589
102762
  });
102590
102763
  var FileReadStream = ReadStream;
102591
- Object.defineProperty(fs17, "FileReadStream", {
102764
+ Object.defineProperty(fs19, "FileReadStream", {
102592
102765
  get: function() {
102593
102766
  return FileReadStream;
102594
102767
  },
@@ -102599,7 +102772,7 @@ var require_graceful_fs = __commonJS({
102599
102772
  configurable: true
102600
102773
  });
102601
102774
  var FileWriteStream = WriteStream;
102602
- Object.defineProperty(fs17, "FileWriteStream", {
102775
+ Object.defineProperty(fs19, "FileWriteStream", {
102603
102776
  get: function() {
102604
102777
  return FileWriteStream;
102605
102778
  },
@@ -102609,7 +102782,7 @@ var require_graceful_fs = __commonJS({
102609
102782
  enumerable: true,
102610
102783
  configurable: true
102611
102784
  });
102612
- function ReadStream(path13, options) {
102785
+ function ReadStream(path15, options) {
102613
102786
  if (this instanceof ReadStream)
102614
102787
  return fs$ReadStream.apply(this, arguments), this;
102615
102788
  else
@@ -102629,7 +102802,7 @@ var require_graceful_fs = __commonJS({
102629
102802
  }
102630
102803
  });
102631
102804
  }
102632
- function WriteStream(path13, options) {
102805
+ function WriteStream(path15, options) {
102633
102806
  if (this instanceof WriteStream)
102634
102807
  return fs$WriteStream.apply(this, arguments), this;
102635
102808
  else
@@ -102647,22 +102820,22 @@ var require_graceful_fs = __commonJS({
102647
102820
  }
102648
102821
  });
102649
102822
  }
102650
- function createReadStream(path13, options) {
102651
- return new fs17.ReadStream(path13, options);
102823
+ function createReadStream(path15, options) {
102824
+ return new fs19.ReadStream(path15, options);
102652
102825
  }
102653
- function createWriteStream(path13, options) {
102654
- return new fs17.WriteStream(path13, options);
102826
+ function createWriteStream(path15, options) {
102827
+ return new fs19.WriteStream(path15, options);
102655
102828
  }
102656
- var fs$open = fs17.open;
102657
- fs17.open = open2;
102658
- function open2(path13, flags, mode, cb) {
102829
+ var fs$open = fs19.open;
102830
+ fs19.open = open2;
102831
+ function open2(path15, flags, mode, cb) {
102659
102832
  if (typeof mode === "function")
102660
102833
  cb = mode, mode = null;
102661
- return go$open(path13, flags, mode, cb);
102662
- function go$open(path14, flags2, mode2, cb2, startTime) {
102663
- return fs$open(path14, flags2, mode2, function(err, fd) {
102834
+ return go$open(path15, flags, mode, cb);
102835
+ function go$open(path16, flags2, mode2, cb2, startTime) {
102836
+ return fs$open(path16, flags2, mode2, function(err, fd) {
102664
102837
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
102665
- enqueue([go$open, [path14, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
102838
+ enqueue([go$open, [path16, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
102666
102839
  else {
102667
102840
  if (typeof cb2 === "function")
102668
102841
  cb2.apply(this, arguments);
@@ -102670,20 +102843,20 @@ var require_graceful_fs = __commonJS({
102670
102843
  });
102671
102844
  }
102672
102845
  }
102673
- return fs17;
102846
+ return fs19;
102674
102847
  }
102675
102848
  function enqueue(elem) {
102676
102849
  debug("ENQUEUE", elem[0].name, elem[1]);
102677
- fs16[gracefulQueue].push(elem);
102850
+ fs18[gracefulQueue].push(elem);
102678
102851
  retry();
102679
102852
  }
102680
102853
  var retryTimer;
102681
102854
  function resetQueue() {
102682
102855
  var now = Date.now();
102683
- for (var i2 = 0; i2 < fs16[gracefulQueue].length; ++i2) {
102684
- if (fs16[gracefulQueue][i2].length > 2) {
102685
- fs16[gracefulQueue][i2][3] = now;
102686
- fs16[gracefulQueue][i2][4] = now;
102856
+ for (var i2 = 0; i2 < fs18[gracefulQueue].length; ++i2) {
102857
+ if (fs18[gracefulQueue][i2].length > 2) {
102858
+ fs18[gracefulQueue][i2][3] = now;
102859
+ fs18[gracefulQueue][i2][4] = now;
102687
102860
  }
102688
102861
  }
102689
102862
  retry();
@@ -102691,9 +102864,9 @@ var require_graceful_fs = __commonJS({
102691
102864
  function retry() {
102692
102865
  clearTimeout(retryTimer);
102693
102866
  retryTimer = void 0;
102694
- if (fs16[gracefulQueue].length === 0)
102867
+ if (fs18[gracefulQueue].length === 0)
102695
102868
  return;
102696
- var elem = fs16[gracefulQueue].shift();
102869
+ var elem = fs18[gracefulQueue].shift();
102697
102870
  var fn = elem[0];
102698
102871
  var args = elem[1];
102699
102872
  var err = elem[2];
@@ -102715,7 +102888,7 @@ var require_graceful_fs = __commonJS({
102715
102888
  debug("RETRY", fn.name, args);
102716
102889
  fn.apply(null, args.concat([startTime]));
102717
102890
  } else {
102718
- fs16[gracefulQueue].push(elem);
102891
+ fs18[gracefulQueue].push(elem);
102719
102892
  }
102720
102893
  }
102721
102894
  if (retryTimer === void 0) {
@@ -102730,7 +102903,7 @@ var require_fs = __commonJS({
102730
102903
  "../../node_modules/fs-extra/lib/fs/index.js"(exports2) {
102731
102904
  "use strict";
102732
102905
  var u2 = require_universalify().fromCallback;
102733
- var fs16 = require_graceful_fs();
102906
+ var fs18 = require_graceful_fs();
102734
102907
  var api = [
102735
102908
  "access",
102736
102909
  "appendFile",
@@ -102771,26 +102944,26 @@ var require_fs = __commonJS({
102771
102944
  "utimes",
102772
102945
  "writeFile"
102773
102946
  ].filter((key) => {
102774
- return typeof fs16[key] === "function";
102947
+ return typeof fs18[key] === "function";
102775
102948
  });
102776
- Object.assign(exports2, fs16);
102949
+ Object.assign(exports2, fs18);
102777
102950
  api.forEach((method) => {
102778
- exports2[method] = u2(fs16[method]);
102951
+ exports2[method] = u2(fs18[method]);
102779
102952
  });
102780
102953
  exports2.exists = function(filename, callback) {
102781
102954
  if (typeof callback === "function") {
102782
- return fs16.exists(filename, callback);
102955
+ return fs18.exists(filename, callback);
102783
102956
  }
102784
102957
  return new Promise((resolve5) => {
102785
- return fs16.exists(filename, resolve5);
102958
+ return fs18.exists(filename, resolve5);
102786
102959
  });
102787
102960
  };
102788
102961
  exports2.read = function(fd, buffer, offset, length, position, callback) {
102789
102962
  if (typeof callback === "function") {
102790
- return fs16.read(fd, buffer, offset, length, position, callback);
102963
+ return fs18.read(fd, buffer, offset, length, position, callback);
102791
102964
  }
102792
102965
  return new Promise((resolve5, reject) => {
102793
- fs16.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
102966
+ fs18.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
102794
102967
  if (err) return reject(err);
102795
102968
  resolve5({ bytesRead, buffer: buffer2 });
102796
102969
  });
@@ -102798,10 +102971,10 @@ var require_fs = __commonJS({
102798
102971
  };
102799
102972
  exports2.write = function(fd, buffer, ...args) {
102800
102973
  if (typeof args[args.length - 1] === "function") {
102801
- return fs16.write(fd, buffer, ...args);
102974
+ return fs18.write(fd, buffer, ...args);
102802
102975
  }
102803
102976
  return new Promise((resolve5, reject) => {
102804
- fs16.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
102977
+ fs18.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
102805
102978
  if (err) return reject(err);
102806
102979
  resolve5({ bytesWritten, buffer: buffer2 });
102807
102980
  });
@@ -102809,10 +102982,10 @@ var require_fs = __commonJS({
102809
102982
  };
102810
102983
  exports2.readv = function(fd, buffers, ...args) {
102811
102984
  if (typeof args[args.length - 1] === "function") {
102812
- return fs16.readv(fd, buffers, ...args);
102985
+ return fs18.readv(fd, buffers, ...args);
102813
102986
  }
102814
102987
  return new Promise((resolve5, reject) => {
102815
- fs16.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
102988
+ fs18.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
102816
102989
  if (err) return reject(err);
102817
102990
  resolve5({ bytesRead, buffers: buffers2 });
102818
102991
  });
@@ -102820,17 +102993,17 @@ var require_fs = __commonJS({
102820
102993
  };
102821
102994
  exports2.writev = function(fd, buffers, ...args) {
102822
102995
  if (typeof args[args.length - 1] === "function") {
102823
- return fs16.writev(fd, buffers, ...args);
102996
+ return fs18.writev(fd, buffers, ...args);
102824
102997
  }
102825
102998
  return new Promise((resolve5, reject) => {
102826
- fs16.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
102999
+ fs18.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
102827
103000
  if (err) return reject(err);
102828
103001
  resolve5({ bytesWritten, buffers: buffers2 });
102829
103002
  });
102830
103003
  });
102831
103004
  };
102832
- if (typeof fs16.realpath.native === "function") {
102833
- exports2.realpath.native = u2(fs16.realpath.native);
103005
+ if (typeof fs18.realpath.native === "function") {
103006
+ exports2.realpath.native = u2(fs18.realpath.native);
102834
103007
  } else {
102835
103008
  process.emitWarning(
102836
103009
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -102845,10 +103018,10 @@ var require_fs = __commonJS({
102845
103018
  var require_utils3 = __commonJS({
102846
103019
  "../../node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
102847
103020
  "use strict";
102848
- var path13 = require("path");
103021
+ var path15 = require("path");
102849
103022
  module2.exports.checkPath = function checkPath(pth) {
102850
103023
  if (process.platform === "win32") {
102851
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path13.parse(pth).root, ""));
103024
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path15.parse(pth).root, ""));
102852
103025
  if (pathHasInvalidWinCharacters) {
102853
103026
  const error = new Error(`Path contains invalid characters: ${pth}`);
102854
103027
  error.code = "EINVAL";
@@ -102863,7 +103036,7 @@ var require_utils3 = __commonJS({
102863
103036
  var require_make_dir = __commonJS({
102864
103037
  "../../node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
102865
103038
  "use strict";
102866
- var fs16 = require_fs();
103039
+ var fs18 = require_fs();
102867
103040
  var { checkPath } = require_utils3();
102868
103041
  var getMode = (options) => {
102869
103042
  const defaults2 = { mode: 511 };
@@ -102872,14 +103045,14 @@ var require_make_dir = __commonJS({
102872
103045
  };
102873
103046
  module2.exports.makeDir = async (dir, options) => {
102874
103047
  checkPath(dir);
102875
- return fs16.mkdir(dir, {
103048
+ return fs18.mkdir(dir, {
102876
103049
  mode: getMode(options),
102877
103050
  recursive: true
102878
103051
  });
102879
103052
  };
102880
103053
  module2.exports.makeDirSync = (dir, options) => {
102881
103054
  checkPath(dir);
102882
- return fs16.mkdirSync(dir, {
103055
+ return fs18.mkdirSync(dir, {
102883
103056
  mode: getMode(options),
102884
103057
  recursive: true
102885
103058
  });
@@ -102911,13 +103084,13 @@ var require_path_exists = __commonJS({
102911
103084
  "../../node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
102912
103085
  "use strict";
102913
103086
  var u2 = require_universalify().fromPromise;
102914
- var fs16 = require_fs();
102915
- function pathExists(path13) {
102916
- return fs16.access(path13).then(() => true).catch(() => false);
103087
+ var fs18 = require_fs();
103088
+ function pathExists(path15) {
103089
+ return fs18.access(path15).then(() => true).catch(() => false);
102917
103090
  }
102918
103091
  module2.exports = {
102919
103092
  pathExists: u2(pathExists),
102920
- pathExistsSync: fs16.existsSync
103093
+ pathExistsSync: fs18.existsSync
102921
103094
  };
102922
103095
  }
102923
103096
  });
@@ -102926,16 +103099,16 @@ var require_path_exists = __commonJS({
102926
103099
  var require_utimes = __commonJS({
102927
103100
  "../../node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
102928
103101
  "use strict";
102929
- var fs16 = require_fs();
103102
+ var fs18 = require_fs();
102930
103103
  var u2 = require_universalify().fromPromise;
102931
- async function utimesMillis(path13, atime, mtime) {
102932
- const fd = await fs16.open(path13, "r+");
103104
+ async function utimesMillis(path15, atime, mtime) {
103105
+ const fd = await fs18.open(path15, "r+");
102933
103106
  let closeErr = null;
102934
103107
  try {
102935
- await fs16.futimes(fd, atime, mtime);
103108
+ await fs18.futimes(fd, atime, mtime);
102936
103109
  } finally {
102937
103110
  try {
102938
- await fs16.close(fd);
103111
+ await fs18.close(fd);
102939
103112
  } catch (e) {
102940
103113
  closeErr = e;
102941
103114
  }
@@ -102944,10 +103117,10 @@ var require_utimes = __commonJS({
102944
103117
  throw closeErr;
102945
103118
  }
102946
103119
  }
102947
- function utimesMillisSync(path13, atime, mtime) {
102948
- const fd = fs16.openSync(path13, "r+");
102949
- fs16.futimesSync(fd, atime, mtime);
102950
- return fs16.closeSync(fd);
103120
+ function utimesMillisSync(path15, atime, mtime) {
103121
+ const fd = fs18.openSync(path15, "r+");
103122
+ fs18.futimesSync(fd, atime, mtime);
103123
+ return fs18.closeSync(fd);
102951
103124
  }
102952
103125
  module2.exports = {
102953
103126
  utimesMillis: u2(utimesMillis),
@@ -102960,11 +103133,11 @@ var require_utimes = __commonJS({
102960
103133
  var require_stat = __commonJS({
102961
103134
  "../../node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
102962
103135
  "use strict";
102963
- var fs16 = require_fs();
102964
- var path13 = require("path");
103136
+ var fs18 = require_fs();
103137
+ var path15 = require("path");
102965
103138
  var u2 = require_universalify().fromPromise;
102966
103139
  function getStats(src, dest, opts) {
102967
- const statFunc = opts.dereference ? (file) => fs16.stat(file, { bigint: true }) : (file) => fs16.lstat(file, { bigint: true });
103140
+ const statFunc = opts.dereference ? (file) => fs18.stat(file, { bigint: true }) : (file) => fs18.lstat(file, { bigint: true });
102968
103141
  return Promise.all([
102969
103142
  statFunc(src),
102970
103143
  statFunc(dest).catch((err) => {
@@ -102975,7 +103148,7 @@ var require_stat = __commonJS({
102975
103148
  }
102976
103149
  function getStatsSync(src, dest, opts) {
102977
103150
  let destStat;
102978
- const statFunc = opts.dereference ? (file) => fs16.statSync(file, { bigint: true }) : (file) => fs16.lstatSync(file, { bigint: true });
103151
+ const statFunc = opts.dereference ? (file) => fs18.statSync(file, { bigint: true }) : (file) => fs18.lstatSync(file, { bigint: true });
102979
103152
  const srcStat = statFunc(src);
102980
103153
  try {
102981
103154
  destStat = statFunc(dest);
@@ -102989,8 +103162,8 @@ var require_stat = __commonJS({
102989
103162
  const { srcStat, destStat } = await getStats(src, dest, opts);
102990
103163
  if (destStat) {
102991
103164
  if (areIdentical(srcStat, destStat)) {
102992
- const srcBaseName = path13.basename(src);
102993
- const destBaseName = path13.basename(dest);
103165
+ const srcBaseName = path15.basename(src);
103166
+ const destBaseName = path15.basename(dest);
102994
103167
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
102995
103168
  return { srcStat, destStat, isChangingCase: true };
102996
103169
  }
@@ -103012,8 +103185,8 @@ var require_stat = __commonJS({
103012
103185
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
103013
103186
  if (destStat) {
103014
103187
  if (areIdentical(srcStat, destStat)) {
103015
- const srcBaseName = path13.basename(src);
103016
- const destBaseName = path13.basename(dest);
103188
+ const srcBaseName = path15.basename(src);
103189
+ const destBaseName = path15.basename(dest);
103017
103190
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
103018
103191
  return { srcStat, destStat, isChangingCase: true };
103019
103192
  }
@@ -103032,12 +103205,12 @@ var require_stat = __commonJS({
103032
103205
  return { srcStat, destStat };
103033
103206
  }
103034
103207
  async function checkParentPaths(src, srcStat, dest, funcName) {
103035
- const srcParent = path13.resolve(path13.dirname(src));
103036
- const destParent = path13.resolve(path13.dirname(dest));
103037
- if (destParent === srcParent || destParent === path13.parse(destParent).root) return;
103208
+ const srcParent = path15.resolve(path15.dirname(src));
103209
+ const destParent = path15.resolve(path15.dirname(dest));
103210
+ if (destParent === srcParent || destParent === path15.parse(destParent).root) return;
103038
103211
  let destStat;
103039
103212
  try {
103040
- destStat = await fs16.stat(destParent, { bigint: true });
103213
+ destStat = await fs18.stat(destParent, { bigint: true });
103041
103214
  } catch (err) {
103042
103215
  if (err.code === "ENOENT") return;
103043
103216
  throw err;
@@ -103048,12 +103221,12 @@ var require_stat = __commonJS({
103048
103221
  return checkParentPaths(src, srcStat, destParent, funcName);
103049
103222
  }
103050
103223
  function checkParentPathsSync(src, srcStat, dest, funcName) {
103051
- const srcParent = path13.resolve(path13.dirname(src));
103052
- const destParent = path13.resolve(path13.dirname(dest));
103053
- if (destParent === srcParent || destParent === path13.parse(destParent).root) return;
103224
+ const srcParent = path15.resolve(path15.dirname(src));
103225
+ const destParent = path15.resolve(path15.dirname(dest));
103226
+ if (destParent === srcParent || destParent === path15.parse(destParent).root) return;
103054
103227
  let destStat;
103055
103228
  try {
103056
- destStat = fs16.statSync(destParent, { bigint: true });
103229
+ destStat = fs18.statSync(destParent, { bigint: true });
103057
103230
  } catch (err) {
103058
103231
  if (err.code === "ENOENT") return;
103059
103232
  throw err;
@@ -103067,8 +103240,8 @@ var require_stat = __commonJS({
103067
103240
  return destStat.ino !== void 0 && destStat.dev !== void 0 && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
103068
103241
  }
103069
103242
  function isSrcSubdir(src, dest) {
103070
- const srcArr = path13.resolve(src).split(path13.sep).filter((i2) => i2);
103071
- const destArr = path13.resolve(dest).split(path13.sep).filter((i2) => i2);
103243
+ const srcArr = path15.resolve(src).split(path15.sep).filter((i2) => i2);
103244
+ const destArr = path15.resolve(dest).split(path15.sep).filter((i2) => i2);
103072
103245
  return srcArr.every((cur, i2) => destArr[i2] === cur);
103073
103246
  }
103074
103247
  function errMsg(src, dest, funcName) {
@@ -103120,8 +103293,8 @@ var require_async2 = __commonJS({
103120
103293
  var require_copy = __commonJS({
103121
103294
  "../../node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
103122
103295
  "use strict";
103123
- var fs16 = require_fs();
103124
- var path13 = require("path");
103296
+ var fs18 = require_fs();
103297
+ var path15 = require("path");
103125
103298
  var { mkdirs } = require_mkdirs();
103126
103299
  var { pathExists } = require_path_exists();
103127
103300
  var { utimesMillis } = require_utimes();
@@ -103144,7 +103317,7 @@ var require_copy = __commonJS({
103144
103317
  await stat.checkParentPaths(src, srcStat, dest, "copy");
103145
103318
  const include = await runFilter(src, dest, opts);
103146
103319
  if (!include) return;
103147
- const destParent = path13.dirname(dest);
103320
+ const destParent = path15.dirname(dest);
103148
103321
  const dirExists = await pathExists(destParent);
103149
103322
  if (!dirExists) {
103150
103323
  await mkdirs(destParent);
@@ -103156,7 +103329,7 @@ var require_copy = __commonJS({
103156
103329
  return opts.filter(src, dest);
103157
103330
  }
103158
103331
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
103159
- const statFn = opts.dereference ? fs16.stat : fs16.lstat;
103332
+ const statFn = opts.dereference ? fs18.stat : fs18.lstat;
103160
103333
  const srcStat = await statFn(src);
103161
103334
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
103162
103335
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -103168,7 +103341,7 @@ var require_copy = __commonJS({
103168
103341
  async function onFile(srcStat, destStat, src, dest, opts) {
103169
103342
  if (!destStat) return copyFile(srcStat, src, dest, opts);
103170
103343
  if (opts.overwrite) {
103171
- await fs16.unlink(dest);
103344
+ await fs18.unlink(dest);
103172
103345
  return copyFile(srcStat, src, dest, opts);
103173
103346
  }
103174
103347
  if (opts.errorOnExist) {
@@ -103176,29 +103349,29 @@ var require_copy = __commonJS({
103176
103349
  }
103177
103350
  }
103178
103351
  async function copyFile(srcStat, src, dest, opts) {
103179
- await fs16.copyFile(src, dest);
103352
+ await fs18.copyFile(src, dest);
103180
103353
  if (opts.preserveTimestamps) {
103181
103354
  if (fileIsNotWritable(srcStat.mode)) {
103182
103355
  await makeFileWritable(dest, srcStat.mode);
103183
103356
  }
103184
- const updatedSrcStat = await fs16.stat(src);
103357
+ const updatedSrcStat = await fs18.stat(src);
103185
103358
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
103186
103359
  }
103187
- return fs16.chmod(dest, srcStat.mode);
103360
+ return fs18.chmod(dest, srcStat.mode);
103188
103361
  }
103189
103362
  function fileIsNotWritable(srcMode) {
103190
103363
  return (srcMode & 128) === 0;
103191
103364
  }
103192
103365
  function makeFileWritable(dest, srcMode) {
103193
- return fs16.chmod(dest, srcMode | 128);
103366
+ return fs18.chmod(dest, srcMode | 128);
103194
103367
  }
103195
103368
  async function onDir(srcStat, destStat, src, dest, opts) {
103196
103369
  if (!destStat) {
103197
- await fs16.mkdir(dest);
103370
+ await fs18.mkdir(dest);
103198
103371
  }
103199
- await asyncIteratorConcurrentProcess(await fs16.opendir(src), async (item) => {
103200
- const srcItem = path13.join(src, item.name);
103201
- const destItem = path13.join(dest, item.name);
103372
+ await asyncIteratorConcurrentProcess(await fs18.opendir(src), async (item) => {
103373
+ const srcItem = path15.join(src, item.name);
103374
+ const destItem = path15.join(dest, item.name);
103202
103375
  const include = await runFilter(srcItem, destItem, opts);
103203
103376
  if (include) {
103204
103377
  const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
@@ -103206,26 +103379,26 @@ var require_copy = __commonJS({
103206
103379
  }
103207
103380
  });
103208
103381
  if (!destStat) {
103209
- await fs16.chmod(dest, srcStat.mode);
103382
+ await fs18.chmod(dest, srcStat.mode);
103210
103383
  }
103211
103384
  }
103212
103385
  async function onLink(destStat, src, dest, opts) {
103213
- let resolvedSrc = await fs16.readlink(src);
103386
+ let resolvedSrc = await fs18.readlink(src);
103214
103387
  if (opts.dereference) {
103215
- resolvedSrc = path13.resolve(process.cwd(), resolvedSrc);
103388
+ resolvedSrc = path15.resolve(process.cwd(), resolvedSrc);
103216
103389
  }
103217
103390
  if (!destStat) {
103218
- return fs16.symlink(resolvedSrc, dest);
103391
+ return fs18.symlink(resolvedSrc, dest);
103219
103392
  }
103220
103393
  let resolvedDest = null;
103221
103394
  try {
103222
- resolvedDest = await fs16.readlink(dest);
103395
+ resolvedDest = await fs18.readlink(dest);
103223
103396
  } catch (e) {
103224
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs16.symlink(resolvedSrc, dest);
103397
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs18.symlink(resolvedSrc, dest);
103225
103398
  throw e;
103226
103399
  }
103227
103400
  if (opts.dereference) {
103228
- resolvedDest = path13.resolve(process.cwd(), resolvedDest);
103401
+ resolvedDest = path15.resolve(process.cwd(), resolvedDest);
103229
103402
  }
103230
103403
  if (resolvedSrc !== resolvedDest) {
103231
103404
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -103235,8 +103408,8 @@ var require_copy = __commonJS({
103235
103408
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
103236
103409
  }
103237
103410
  }
103238
- await fs16.unlink(dest);
103239
- return fs16.symlink(resolvedSrc, dest);
103411
+ await fs18.unlink(dest);
103412
+ return fs18.symlink(resolvedSrc, dest);
103240
103413
  }
103241
103414
  module2.exports = copy;
103242
103415
  }
@@ -103246,8 +103419,8 @@ var require_copy = __commonJS({
103246
103419
  var require_copy_sync = __commonJS({
103247
103420
  "../../node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
103248
103421
  "use strict";
103249
- var fs16 = require_graceful_fs();
103250
- var path13 = require("path");
103422
+ var fs18 = require_graceful_fs();
103423
+ var path15 = require("path");
103251
103424
  var mkdirsSync = require_mkdirs().mkdirsSync;
103252
103425
  var utimesMillisSync = require_utimes().utimesMillisSync;
103253
103426
  var stat = require_stat();
@@ -103268,13 +103441,13 @@ var require_copy_sync = __commonJS({
103268
103441
  const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
103269
103442
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
103270
103443
  if (opts.filter && !opts.filter(src, dest)) return;
103271
- const destParent = path13.dirname(dest);
103272
- if (!fs16.existsSync(destParent)) mkdirsSync(destParent);
103444
+ const destParent = path15.dirname(dest);
103445
+ if (!fs18.existsSync(destParent)) mkdirsSync(destParent);
103273
103446
  return getStats(destStat, src, dest, opts);
103274
103447
  }
103275
103448
  function getStats(destStat, src, dest, opts) {
103276
- const statSync2 = opts.dereference ? fs16.statSync : fs16.lstatSync;
103277
- const srcStat = statSync2(src);
103449
+ const statSync3 = opts.dereference ? fs18.statSync : fs18.lstatSync;
103450
+ const srcStat = statSync3(src);
103278
103451
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
103279
103452
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
103280
103453
  else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
@@ -103288,14 +103461,14 @@ var require_copy_sync = __commonJS({
103288
103461
  }
103289
103462
  function mayCopyFile(srcStat, src, dest, opts) {
103290
103463
  if (opts.overwrite) {
103291
- fs16.unlinkSync(dest);
103464
+ fs18.unlinkSync(dest);
103292
103465
  return copyFile(srcStat, src, dest, opts);
103293
103466
  } else if (opts.errorOnExist) {
103294
103467
  throw new Error(`'${dest}' already exists`);
103295
103468
  }
103296
103469
  }
103297
103470
  function copyFile(srcStat, src, dest, opts) {
103298
- fs16.copyFileSync(src, dest);
103471
+ fs18.copyFileSync(src, dest);
103299
103472
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
103300
103473
  return setDestMode(dest, srcStat.mode);
103301
103474
  }
@@ -103310,10 +103483,10 @@ var require_copy_sync = __commonJS({
103310
103483
  return setDestMode(dest, srcMode | 128);
103311
103484
  }
103312
103485
  function setDestMode(dest, srcMode) {
103313
- return fs16.chmodSync(dest, srcMode);
103486
+ return fs18.chmodSync(dest, srcMode);
103314
103487
  }
103315
103488
  function setDestTimestamps(src, dest) {
103316
- const updatedSrcStat = fs16.statSync(src);
103489
+ const updatedSrcStat = fs18.statSync(src);
103317
103490
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
103318
103491
  }
103319
103492
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -103321,12 +103494,12 @@ var require_copy_sync = __commonJS({
103321
103494
  return copyDir(src, dest, opts);
103322
103495
  }
103323
103496
  function mkDirAndCopy(srcMode, src, dest, opts) {
103324
- fs16.mkdirSync(dest);
103497
+ fs18.mkdirSync(dest);
103325
103498
  copyDir(src, dest, opts);
103326
103499
  return setDestMode(dest, srcMode);
103327
103500
  }
103328
103501
  function copyDir(src, dest, opts) {
103329
- const dir = fs16.opendirSync(src);
103502
+ const dir = fs18.opendirSync(src);
103330
103503
  try {
103331
103504
  let dirent;
103332
103505
  while ((dirent = dir.readSync()) !== null) {
@@ -103337,29 +103510,29 @@ var require_copy_sync = __commonJS({
103337
103510
  }
103338
103511
  }
103339
103512
  function copyDirItem(item, src, dest, opts) {
103340
- const srcItem = path13.join(src, item);
103341
- const destItem = path13.join(dest, item);
103513
+ const srcItem = path15.join(src, item);
103514
+ const destItem = path15.join(dest, item);
103342
103515
  if (opts.filter && !opts.filter(srcItem, destItem)) return;
103343
103516
  const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
103344
103517
  return getStats(destStat, srcItem, destItem, opts);
103345
103518
  }
103346
103519
  function onLink(destStat, src, dest, opts) {
103347
- let resolvedSrc = fs16.readlinkSync(src);
103520
+ let resolvedSrc = fs18.readlinkSync(src);
103348
103521
  if (opts.dereference) {
103349
- resolvedSrc = path13.resolve(process.cwd(), resolvedSrc);
103522
+ resolvedSrc = path15.resolve(process.cwd(), resolvedSrc);
103350
103523
  }
103351
103524
  if (!destStat) {
103352
- return fs16.symlinkSync(resolvedSrc, dest);
103525
+ return fs18.symlinkSync(resolvedSrc, dest);
103353
103526
  } else {
103354
103527
  let resolvedDest;
103355
103528
  try {
103356
- resolvedDest = fs16.readlinkSync(dest);
103529
+ resolvedDest = fs18.readlinkSync(dest);
103357
103530
  } catch (err) {
103358
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs16.symlinkSync(resolvedSrc, dest);
103531
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs18.symlinkSync(resolvedSrc, dest);
103359
103532
  throw err;
103360
103533
  }
103361
103534
  if (opts.dereference) {
103362
- resolvedDest = path13.resolve(process.cwd(), resolvedDest);
103535
+ resolvedDest = path15.resolve(process.cwd(), resolvedDest);
103363
103536
  }
103364
103537
  if (resolvedSrc !== resolvedDest) {
103365
103538
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -103373,8 +103546,8 @@ var require_copy_sync = __commonJS({
103373
103546
  }
103374
103547
  }
103375
103548
  function copyLink(resolvedSrc, dest) {
103376
- fs16.unlinkSync(dest);
103377
- return fs16.symlinkSync(resolvedSrc, dest);
103549
+ fs18.unlinkSync(dest);
103550
+ return fs18.symlinkSync(resolvedSrc, dest);
103378
103551
  }
103379
103552
  module2.exports = copySync;
103380
103553
  }
@@ -103396,13 +103569,13 @@ var require_copy2 = __commonJS({
103396
103569
  var require_remove = __commonJS({
103397
103570
  "../../node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
103398
103571
  "use strict";
103399
- var fs16 = require_graceful_fs();
103572
+ var fs18 = require_graceful_fs();
103400
103573
  var u2 = require_universalify().fromCallback;
103401
- function remove(path13, callback) {
103402
- fs16.rm(path13, { recursive: true, force: true }, callback);
103574
+ function remove(path15, callback) {
103575
+ fs18.rm(path15, { recursive: true, force: true }, callback);
103403
103576
  }
103404
- function removeSync(path13) {
103405
- fs16.rmSync(path13, { recursive: true, force: true });
103577
+ function removeSync(path15) {
103578
+ fs18.rmSync(path15, { recursive: true, force: true });
103406
103579
  }
103407
103580
  module2.exports = {
103408
103581
  remove: u2(remove),
@@ -103416,28 +103589,28 @@ var require_empty2 = __commonJS({
103416
103589
  "../../node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
103417
103590
  "use strict";
103418
103591
  var u2 = require_universalify().fromPromise;
103419
- var fs16 = require_fs();
103420
- var path13 = require("path");
103592
+ var fs18 = require_fs();
103593
+ var path15 = require("path");
103421
103594
  var mkdir = require_mkdirs();
103422
103595
  var remove = require_remove();
103423
103596
  var emptyDir = u2(async function emptyDir2(dir) {
103424
103597
  let items;
103425
103598
  try {
103426
- items = await fs16.readdir(dir);
103599
+ items = await fs18.readdir(dir);
103427
103600
  } catch {
103428
103601
  return mkdir.mkdirs(dir);
103429
103602
  }
103430
- return Promise.all(items.map((item) => remove.remove(path13.join(dir, item))));
103603
+ return Promise.all(items.map((item) => remove.remove(path15.join(dir, item))));
103431
103604
  });
103432
103605
  function emptyDirSync(dir) {
103433
103606
  let items;
103434
103607
  try {
103435
- items = fs16.readdirSync(dir);
103608
+ items = fs18.readdirSync(dir);
103436
103609
  } catch {
103437
103610
  return mkdir.mkdirsSync(dir);
103438
103611
  }
103439
103612
  items.forEach((item) => {
103440
- item = path13.join(dir, item);
103613
+ item = path15.join(dir, item);
103441
103614
  remove.removeSync(item);
103442
103615
  });
103443
103616
  }
@@ -103455,52 +103628,52 @@ var require_file = __commonJS({
103455
103628
  "../../node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
103456
103629
  "use strict";
103457
103630
  var u2 = require_universalify().fromPromise;
103458
- var path13 = require("path");
103459
- var fs16 = require_fs();
103631
+ var path15 = require("path");
103632
+ var fs18 = require_fs();
103460
103633
  var mkdir = require_mkdirs();
103461
103634
  async function createFile(file) {
103462
103635
  let stats;
103463
103636
  try {
103464
- stats = await fs16.stat(file);
103637
+ stats = await fs18.stat(file);
103465
103638
  } catch {
103466
103639
  }
103467
103640
  if (stats && stats.isFile()) return;
103468
- const dir = path13.dirname(file);
103641
+ const dir = path15.dirname(file);
103469
103642
  let dirStats = null;
103470
103643
  try {
103471
- dirStats = await fs16.stat(dir);
103644
+ dirStats = await fs18.stat(dir);
103472
103645
  } catch (err) {
103473
103646
  if (err.code === "ENOENT") {
103474
103647
  await mkdir.mkdirs(dir);
103475
- await fs16.writeFile(file, "");
103648
+ await fs18.writeFile(file, "");
103476
103649
  return;
103477
103650
  } else {
103478
103651
  throw err;
103479
103652
  }
103480
103653
  }
103481
103654
  if (dirStats.isDirectory()) {
103482
- await fs16.writeFile(file, "");
103655
+ await fs18.writeFile(file, "");
103483
103656
  } else {
103484
- await fs16.readdir(dir);
103657
+ await fs18.readdir(dir);
103485
103658
  }
103486
103659
  }
103487
103660
  function createFileSync(file) {
103488
103661
  let stats;
103489
103662
  try {
103490
- stats = fs16.statSync(file);
103663
+ stats = fs18.statSync(file);
103491
103664
  } catch {
103492
103665
  }
103493
103666
  if (stats && stats.isFile()) return;
103494
- const dir = path13.dirname(file);
103667
+ const dir = path15.dirname(file);
103495
103668
  try {
103496
- if (!fs16.statSync(dir).isDirectory()) {
103497
- fs16.readdirSync(dir);
103669
+ if (!fs18.statSync(dir).isDirectory()) {
103670
+ fs18.readdirSync(dir);
103498
103671
  }
103499
103672
  } catch (err) {
103500
103673
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
103501
103674
  else throw err;
103502
103675
  }
103503
- fs16.writeFileSync(file, "");
103676
+ fs18.writeFileSync(file, "");
103504
103677
  }
103505
103678
  module2.exports = {
103506
103679
  createFile: u2(createFile),
@@ -103514,50 +103687,50 @@ var require_link = __commonJS({
103514
103687
  "../../node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
103515
103688
  "use strict";
103516
103689
  var u2 = require_universalify().fromPromise;
103517
- var path13 = require("path");
103518
- var fs16 = require_fs();
103690
+ var path15 = require("path");
103691
+ var fs18 = require_fs();
103519
103692
  var mkdir = require_mkdirs();
103520
103693
  var { pathExists } = require_path_exists();
103521
103694
  var { areIdentical } = require_stat();
103522
103695
  async function createLink(srcpath, dstpath) {
103523
103696
  let dstStat;
103524
103697
  try {
103525
- dstStat = await fs16.lstat(dstpath);
103698
+ dstStat = await fs18.lstat(dstpath);
103526
103699
  } catch {
103527
103700
  }
103528
103701
  let srcStat;
103529
103702
  try {
103530
- srcStat = await fs16.lstat(srcpath);
103703
+ srcStat = await fs18.lstat(srcpath);
103531
103704
  } catch (err) {
103532
103705
  err.message = err.message.replace("lstat", "ensureLink");
103533
103706
  throw err;
103534
103707
  }
103535
103708
  if (dstStat && areIdentical(srcStat, dstStat)) return;
103536
- const dir = path13.dirname(dstpath);
103709
+ const dir = path15.dirname(dstpath);
103537
103710
  const dirExists = await pathExists(dir);
103538
103711
  if (!dirExists) {
103539
103712
  await mkdir.mkdirs(dir);
103540
103713
  }
103541
- await fs16.link(srcpath, dstpath);
103714
+ await fs18.link(srcpath, dstpath);
103542
103715
  }
103543
103716
  function createLinkSync(srcpath, dstpath) {
103544
103717
  let dstStat;
103545
103718
  try {
103546
- dstStat = fs16.lstatSync(dstpath);
103719
+ dstStat = fs18.lstatSync(dstpath);
103547
103720
  } catch {
103548
103721
  }
103549
103722
  try {
103550
- const srcStat = fs16.lstatSync(srcpath);
103723
+ const srcStat = fs18.lstatSync(srcpath);
103551
103724
  if (dstStat && areIdentical(srcStat, dstStat)) return;
103552
103725
  } catch (err) {
103553
103726
  err.message = err.message.replace("lstat", "ensureLink");
103554
103727
  throw err;
103555
103728
  }
103556
- const dir = path13.dirname(dstpath);
103557
- const dirExists = fs16.existsSync(dir);
103558
- if (dirExists) return fs16.linkSync(srcpath, dstpath);
103729
+ const dir = path15.dirname(dstpath);
103730
+ const dirExists = fs18.existsSync(dir);
103731
+ if (dirExists) return fs18.linkSync(srcpath, dstpath);
103559
103732
  mkdir.mkdirsSync(dir);
103560
- return fs16.linkSync(srcpath, dstpath);
103733
+ return fs18.linkSync(srcpath, dstpath);
103561
103734
  }
103562
103735
  module2.exports = {
103563
103736
  createLink: u2(createLink),
@@ -103570,14 +103743,14 @@ var require_link = __commonJS({
103570
103743
  var require_symlink_paths = __commonJS({
103571
103744
  "../../node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
103572
103745
  "use strict";
103573
- var path13 = require("path");
103574
- var fs16 = require_fs();
103746
+ var path15 = require("path");
103747
+ var fs18 = require_fs();
103575
103748
  var { pathExists } = require_path_exists();
103576
103749
  var u2 = require_universalify().fromPromise;
103577
103750
  async function symlinkPaths(srcpath, dstpath) {
103578
- if (path13.isAbsolute(srcpath)) {
103751
+ if (path15.isAbsolute(srcpath)) {
103579
103752
  try {
103580
- await fs16.lstat(srcpath);
103753
+ await fs18.lstat(srcpath);
103581
103754
  } catch (err) {
103582
103755
  err.message = err.message.replace("lstat", "ensureSymlink");
103583
103756
  throw err;
@@ -103587,8 +103760,8 @@ var require_symlink_paths = __commonJS({
103587
103760
  toDst: srcpath
103588
103761
  };
103589
103762
  }
103590
- const dstdir = path13.dirname(dstpath);
103591
- const relativeToDst = path13.join(dstdir, srcpath);
103763
+ const dstdir = path15.dirname(dstpath);
103764
+ const relativeToDst = path15.join(dstdir, srcpath);
103592
103765
  const exists = await pathExists(relativeToDst);
103593
103766
  if (exists) {
103594
103767
  return {
@@ -103597,39 +103770,39 @@ var require_symlink_paths = __commonJS({
103597
103770
  };
103598
103771
  }
103599
103772
  try {
103600
- await fs16.lstat(srcpath);
103773
+ await fs18.lstat(srcpath);
103601
103774
  } catch (err) {
103602
103775
  err.message = err.message.replace("lstat", "ensureSymlink");
103603
103776
  throw err;
103604
103777
  }
103605
103778
  return {
103606
103779
  toCwd: srcpath,
103607
- toDst: path13.relative(dstdir, srcpath)
103780
+ toDst: path15.relative(dstdir, srcpath)
103608
103781
  };
103609
103782
  }
103610
103783
  function symlinkPathsSync(srcpath, dstpath) {
103611
- if (path13.isAbsolute(srcpath)) {
103612
- const exists2 = fs16.existsSync(srcpath);
103784
+ if (path15.isAbsolute(srcpath)) {
103785
+ const exists2 = fs18.existsSync(srcpath);
103613
103786
  if (!exists2) throw new Error("absolute srcpath does not exist");
103614
103787
  return {
103615
103788
  toCwd: srcpath,
103616
103789
  toDst: srcpath
103617
103790
  };
103618
103791
  }
103619
- const dstdir = path13.dirname(dstpath);
103620
- const relativeToDst = path13.join(dstdir, srcpath);
103621
- const exists = fs16.existsSync(relativeToDst);
103792
+ const dstdir = path15.dirname(dstpath);
103793
+ const relativeToDst = path15.join(dstdir, srcpath);
103794
+ const exists = fs18.existsSync(relativeToDst);
103622
103795
  if (exists) {
103623
103796
  return {
103624
103797
  toCwd: relativeToDst,
103625
103798
  toDst: srcpath
103626
103799
  };
103627
103800
  }
103628
- const srcExists = fs16.existsSync(srcpath);
103801
+ const srcExists = fs18.existsSync(srcpath);
103629
103802
  if (!srcExists) throw new Error("relative srcpath does not exist");
103630
103803
  return {
103631
103804
  toCwd: srcpath,
103632
- toDst: path13.relative(dstdir, srcpath)
103805
+ toDst: path15.relative(dstdir, srcpath)
103633
103806
  };
103634
103807
  }
103635
103808
  module2.exports = {
@@ -103643,13 +103816,13 @@ var require_symlink_paths = __commonJS({
103643
103816
  var require_symlink_type = __commonJS({
103644
103817
  "../../node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
103645
103818
  "use strict";
103646
- var fs16 = require_fs();
103819
+ var fs18 = require_fs();
103647
103820
  var u2 = require_universalify().fromPromise;
103648
103821
  async function symlinkType(srcpath, type) {
103649
103822
  if (type) return type;
103650
103823
  let stats;
103651
103824
  try {
103652
- stats = await fs16.lstat(srcpath);
103825
+ stats = await fs18.lstat(srcpath);
103653
103826
  } catch {
103654
103827
  return "file";
103655
103828
  }
@@ -103659,7 +103832,7 @@ var require_symlink_type = __commonJS({
103659
103832
  if (type) return type;
103660
103833
  let stats;
103661
103834
  try {
103662
- stats = fs16.lstatSync(srcpath);
103835
+ stats = fs18.lstatSync(srcpath);
103663
103836
  } catch {
103664
103837
  return "file";
103665
103838
  }
@@ -103677,8 +103850,8 @@ var require_symlink = __commonJS({
103677
103850
  "../../node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
103678
103851
  "use strict";
103679
103852
  var u2 = require_universalify().fromPromise;
103680
- var path13 = require("path");
103681
- var fs16 = require_fs();
103853
+ var path15 = require("path");
103854
+ var fs18 = require_fs();
103682
103855
  var { mkdirs, mkdirsSync } = require_mkdirs();
103683
103856
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
103684
103857
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -103687,44 +103860,44 @@ var require_symlink = __commonJS({
103687
103860
  async function createSymlink(srcpath, dstpath, type) {
103688
103861
  let stats;
103689
103862
  try {
103690
- stats = await fs16.lstat(dstpath);
103863
+ stats = await fs18.lstat(dstpath);
103691
103864
  } catch {
103692
103865
  }
103693
103866
  if (stats && stats.isSymbolicLink()) {
103694
103867
  const [srcStat, dstStat] = await Promise.all([
103695
- fs16.stat(srcpath),
103696
- fs16.stat(dstpath)
103868
+ fs18.stat(srcpath),
103869
+ fs18.stat(dstpath)
103697
103870
  ]);
103698
103871
  if (areIdentical(srcStat, dstStat)) return;
103699
103872
  }
103700
103873
  const relative2 = await symlinkPaths(srcpath, dstpath);
103701
103874
  srcpath = relative2.toDst;
103702
103875
  const toType = await symlinkType(relative2.toCwd, type);
103703
- const dir = path13.dirname(dstpath);
103876
+ const dir = path15.dirname(dstpath);
103704
103877
  if (!await pathExists(dir)) {
103705
103878
  await mkdirs(dir);
103706
103879
  }
103707
- return fs16.symlink(srcpath, dstpath, toType);
103880
+ return fs18.symlink(srcpath, dstpath, toType);
103708
103881
  }
103709
103882
  function createSymlinkSync(srcpath, dstpath, type) {
103710
103883
  let stats;
103711
103884
  try {
103712
- stats = fs16.lstatSync(dstpath);
103885
+ stats = fs18.lstatSync(dstpath);
103713
103886
  } catch {
103714
103887
  }
103715
103888
  if (stats && stats.isSymbolicLink()) {
103716
- const srcStat = fs16.statSync(srcpath);
103717
- const dstStat = fs16.statSync(dstpath);
103889
+ const srcStat = fs18.statSync(srcpath);
103890
+ const dstStat = fs18.statSync(dstpath);
103718
103891
  if (areIdentical(srcStat, dstStat)) return;
103719
103892
  }
103720
103893
  const relative2 = symlinkPathsSync(srcpath, dstpath);
103721
103894
  srcpath = relative2.toDst;
103722
103895
  type = symlinkTypeSync(relative2.toCwd, type);
103723
- const dir = path13.dirname(dstpath);
103724
- const exists = fs16.existsSync(dir);
103725
- if (exists) return fs16.symlinkSync(srcpath, dstpath, type);
103896
+ const dir = path15.dirname(dstpath);
103897
+ const exists = fs18.existsSync(dir);
103898
+ if (exists) return fs18.symlinkSync(srcpath, dstpath, type);
103726
103899
  mkdirsSync(dir);
103727
- return fs16.symlinkSync(srcpath, dstpath, type);
103900
+ return fs18.symlinkSync(srcpath, dstpath, type);
103728
103901
  }
103729
103902
  module2.exports = {
103730
103903
  createSymlink: u2(createSymlink),
@@ -103791,9 +103964,9 @@ var require_jsonfile = __commonJS({
103791
103964
  if (typeof options === "string") {
103792
103965
  options = { encoding: options };
103793
103966
  }
103794
- const fs16 = options.fs || _fs;
103967
+ const fs18 = options.fs || _fs;
103795
103968
  const shouldThrow = "throws" in options ? options.throws : true;
103796
- let data = await universalify.fromCallback(fs16.readFile)(file, options);
103969
+ let data = await universalify.fromCallback(fs18.readFile)(file, options);
103797
103970
  data = stripBom(data);
103798
103971
  let obj;
103799
103972
  try {
@@ -103809,14 +103982,14 @@ var require_jsonfile = __commonJS({
103809
103982
  return obj;
103810
103983
  }
103811
103984
  var readFile = universalify.fromPromise(_readFile);
103812
- function readFileSync7(file, options = {}) {
103985
+ function readFileSync8(file, options = {}) {
103813
103986
  if (typeof options === "string") {
103814
103987
  options = { encoding: options };
103815
103988
  }
103816
- const fs16 = options.fs || _fs;
103989
+ const fs18 = options.fs || _fs;
103817
103990
  const shouldThrow = "throws" in options ? options.throws : true;
103818
103991
  try {
103819
- let content = fs16.readFileSync(file, options);
103992
+ let content = fs18.readFileSync(file, options);
103820
103993
  content = stripBom(content);
103821
103994
  return JSON.parse(content, options.reviver);
103822
103995
  } catch (err) {
@@ -103829,21 +104002,21 @@ var require_jsonfile = __commonJS({
103829
104002
  }
103830
104003
  }
103831
104004
  async function _writeFile(file, obj, options = {}) {
103832
- const fs16 = options.fs || _fs;
104005
+ const fs18 = options.fs || _fs;
103833
104006
  const str = stringify(obj, options);
103834
- await universalify.fromCallback(fs16.writeFile)(file, str, options);
104007
+ await universalify.fromCallback(fs18.writeFile)(file, str, options);
103835
104008
  }
103836
104009
  var writeFile = universalify.fromPromise(_writeFile);
103837
- function writeFileSync8(file, obj, options = {}) {
103838
- const fs16 = options.fs || _fs;
104010
+ function writeFileSync9(file, obj, options = {}) {
104011
+ const fs18 = options.fs || _fs;
103839
104012
  const str = stringify(obj, options);
103840
- return fs16.writeFileSync(file, str, options);
104013
+ return fs18.writeFileSync(file, str, options);
103841
104014
  }
103842
104015
  module2.exports = {
103843
104016
  readFile,
103844
- readFileSync: readFileSync7,
104017
+ readFileSync: readFileSync8,
103845
104018
  writeFile,
103846
- writeFileSync: writeFileSync8
104019
+ writeFileSync: writeFileSync9
103847
104020
  };
103848
104021
  }
103849
104022
  });
@@ -103868,23 +104041,23 @@ var require_output_file = __commonJS({
103868
104041
  "../../node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
103869
104042
  "use strict";
103870
104043
  var u2 = require_universalify().fromPromise;
103871
- var fs16 = require_fs();
103872
- var path13 = require("path");
104044
+ var fs18 = require_fs();
104045
+ var path15 = require("path");
103873
104046
  var mkdir = require_mkdirs();
103874
104047
  var pathExists = require_path_exists().pathExists;
103875
104048
  async function outputFile(file, data, encoding = "utf-8") {
103876
- const dir = path13.dirname(file);
104049
+ const dir = path15.dirname(file);
103877
104050
  if (!await pathExists(dir)) {
103878
104051
  await mkdir.mkdirs(dir);
103879
104052
  }
103880
- return fs16.writeFile(file, data, encoding);
104053
+ return fs18.writeFile(file, data, encoding);
103881
104054
  }
103882
104055
  function outputFileSync(file, ...args) {
103883
- const dir = path13.dirname(file);
103884
- if (!fs16.existsSync(dir)) {
104056
+ const dir = path15.dirname(file);
104057
+ if (!fs18.existsSync(dir)) {
103885
104058
  mkdir.mkdirsSync(dir);
103886
104059
  }
103887
- fs16.writeFileSync(file, ...args);
104060
+ fs18.writeFileSync(file, ...args);
103888
104061
  }
103889
104062
  module2.exports = {
103890
104063
  outputFile: u2(outputFile),
@@ -103943,8 +104116,8 @@ var require_json = __commonJS({
103943
104116
  var require_move = __commonJS({
103944
104117
  "../../node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
103945
104118
  "use strict";
103946
- var fs16 = require_fs();
103947
- var path13 = require("path");
104119
+ var fs18 = require_fs();
104120
+ var path15 = require("path");
103948
104121
  var { copy } = require_copy2();
103949
104122
  var { remove } = require_remove();
103950
104123
  var { mkdirp } = require_mkdirs();
@@ -103954,8 +104127,8 @@ var require_move = __commonJS({
103954
104127
  const overwrite = opts.overwrite || opts.clobber || false;
103955
104128
  const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
103956
104129
  await stat.checkParentPaths(src, srcStat, dest, "move");
103957
- const destParent = path13.dirname(dest);
103958
- const parsedParentPath = path13.parse(destParent);
104130
+ const destParent = path15.dirname(dest);
104131
+ const parsedParentPath = path15.parse(destParent);
103959
104132
  if (parsedParentPath.root !== destParent) {
103960
104133
  await mkdirp(destParent);
103961
104134
  }
@@ -103970,7 +104143,7 @@ var require_move = __commonJS({
103970
104143
  }
103971
104144
  }
103972
104145
  try {
103973
- await fs16.rename(src, dest);
104146
+ await fs18.rename(src, dest);
103974
104147
  } catch (err) {
103975
104148
  if (err.code !== "EXDEV") {
103976
104149
  throw err;
@@ -103995,8 +104168,8 @@ var require_move = __commonJS({
103995
104168
  var require_move_sync = __commonJS({
103996
104169
  "../../node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
103997
104170
  "use strict";
103998
- var fs16 = require_graceful_fs();
103999
- var path13 = require("path");
104171
+ var fs18 = require_graceful_fs();
104172
+ var path15 = require("path");
104000
104173
  var copySync = require_copy2().copySync;
104001
104174
  var removeSync = require_remove().removeSync;
104002
104175
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -104006,12 +104179,12 @@ var require_move_sync = __commonJS({
104006
104179
  const overwrite = opts.overwrite || opts.clobber || false;
104007
104180
  const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
104008
104181
  stat.checkParentPathsSync(src, srcStat, dest, "move");
104009
- if (!isParentRoot(dest)) mkdirpSync(path13.dirname(dest));
104182
+ if (!isParentRoot(dest)) mkdirpSync(path15.dirname(dest));
104010
104183
  return doRename(src, dest, overwrite, isChangingCase);
104011
104184
  }
104012
104185
  function isParentRoot(dest) {
104013
- const parent = path13.dirname(dest);
104014
- const parsedPath = path13.parse(parent);
104186
+ const parent = path15.dirname(dest);
104187
+ const parsedPath = path15.parse(parent);
104015
104188
  return parsedPath.root === parent;
104016
104189
  }
104017
104190
  function doRename(src, dest, overwrite, isChangingCase) {
@@ -104020,12 +104193,12 @@ var require_move_sync = __commonJS({
104020
104193
  removeSync(dest);
104021
104194
  return rename(src, dest, overwrite);
104022
104195
  }
104023
- if (fs16.existsSync(dest)) throw new Error("dest already exists.");
104196
+ if (fs18.existsSync(dest)) throw new Error("dest already exists.");
104024
104197
  return rename(src, dest, overwrite);
104025
104198
  }
104026
104199
  function rename(src, dest, overwrite) {
104027
104200
  try {
104028
- fs16.renameSync(src, dest);
104201
+ fs18.renameSync(src, dest);
104029
104202
  } catch (err) {
104030
104203
  if (err.code !== "EXDEV") throw err;
104031
104204
  return moveAcrossDevice(src, dest, overwrite);
@@ -104084,8 +104257,16 @@ var init_config = __esm({
104084
104257
  "use strict";
104085
104258
  import_path = __toESM(require("path"), 1);
104086
104259
  import_fs_extra = __toESM(require_lib7(), 1);
104260
+ init_seeka_dir();
104087
104261
  getAppInitConfig = (baseDir) => {
104088
- const initConfigPath = import_path.default.resolve(baseDir || process.cwd(), ".seeka", "init.app.seeka.cli.config.json");
104262
+ const resolvedBase = baseDir || process.cwd();
104263
+ const newConfigPath = resolveAppConfigPath(resolvedBase);
104264
+ const newConfig = readJsonFile(newConfigPath);
104265
+ if (newConfig) {
104266
+ console.log("Reading app config from", newConfigPath);
104267
+ return newConfig;
104268
+ }
104269
+ const initConfigPath = import_path.default.resolve(resolvedBase, ".seeka", "init.app.seeka.cli.config.json");
104089
104270
  if (import_fs_extra.default.existsSync(initConfigPath)) {
104090
104271
  console.log("Reading init config from", initConfigPath);
104091
104272
  const initConfig = JSON.parse(import_fs_extra.default.readFileSync(initConfigPath, "utf-8"));
@@ -104118,29 +104299,29 @@ async function downloadFile(url) {
104118
104299
  const arrayBuffer = await response.arrayBuffer();
104119
104300
  return Buffer.from(arrayBuffer);
104120
104301
  }
104121
- var fs11, path8, aiContextCommand;
104302
+ var fs13, path10, aiContextCommand;
104122
104303
  var init_context = __esm({
104123
104304
  "../cli-apps/src/commands/ai/context/index.ts"() {
104124
104305
  "use strict";
104125
- fs11 = __toESM(require("fs"), 1);
104126
- path8 = __toESM(require("path"), 1);
104306
+ fs13 = __toESM(require("fs"), 1);
104307
+ path10 = __toESM(require("path"), 1);
104127
104308
  init_package();
104128
104309
  init_config();
104129
104310
  init_zip();
104130
104311
  aiContextCommand = async (options = {}) => {
104131
104312
  const targetDir = options.targetDir || process.cwd();
104132
- const contextDestDir = path8.join(targetDir, ".seeka", "ai", "context");
104313
+ const contextDestDir = path10.join(targetDir, ".seeka", "ai", "context");
104133
104314
  const contextUrl = getContextPackageUrl(targetDir, options.contextPackageUrl);
104134
104315
  console.log("Seeka AI Context");
104135
104316
  console.log("================");
104136
104317
  console.log("");
104137
104318
  console.log(`Target: ${contextDestDir}`);
104138
104319
  console.log("");
104139
- if (fs11.existsSync(contextDestDir)) {
104320
+ if (fs13.existsSync(contextDestDir)) {
104140
104321
  console.log("Removing existing AI context...");
104141
- fs11.rmSync(contextDestDir, { recursive: true, force: true });
104322
+ fs13.rmSync(contextDestDir, { recursive: true, force: true });
104142
104323
  }
104143
- fs11.mkdirSync(contextDestDir, { recursive: true });
104324
+ fs13.mkdirSync(contextDestDir, { recursive: true });
104144
104325
  console.log("Downloading AI context package...");
104145
104326
  let zipBuffer;
104146
104327
  try {
@@ -104178,8 +104359,8 @@ var init_context = __esm({
104178
104359
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
104179
104360
  source: options.contextPackageUrl ? "custom" : "public"
104180
104361
  };
104181
- const metaPath = path8.join(contextDestDir, "meta.json");
104182
- fs11.writeFileSync(metaPath, JSON.stringify(metaJson, null, 2), "utf-8");
104362
+ const metaPath = path10.join(contextDestDir, "meta.json");
104363
+ fs13.writeFileSync(metaPath, JSON.stringify(metaJson, null, 2), "utf-8");
104183
104364
  console.log("");
104184
104365
  console.log("\u2713 AI context installed successfully!");
104185
104366
  console.log("");
@@ -104197,15 +104378,15 @@ var init_context = __esm({
104197
104378
  });
104198
104379
 
104199
104380
  // ../cli-apps/src/commands/init/v2/index.ts
104200
- var spawn2, fs12, os4, path9, initCommandV2;
104381
+ var spawn2, fs14, os4, path11, initCommandV2;
104201
104382
  var init_v2 = __esm({
104202
104383
  "../cli-apps/src/commands/init/v2/index.ts"() {
104203
104384
  "use strict";
104204
104385
  init_camelcase();
104205
104386
  spawn2 = __toESM(require_cross_spawn(), 1);
104206
- fs12 = __toESM(require("fs"), 1);
104387
+ fs14 = __toESM(require("fs"), 1);
104207
104388
  os4 = __toESM(require("os"), 1);
104208
- path9 = __toESM(require("path"), 1);
104389
+ path11 = __toESM(require("path"), 1);
104209
104390
  init_package();
104210
104391
  init_helpers();
104211
104392
  init_console();
@@ -104213,6 +104394,7 @@ var init_v2 = __esm({
104213
104394
  init_zip();
104214
104395
  init_context();
104215
104396
  init_config();
104397
+ init_seeka_dir();
104216
104398
  initCommandV2 = async (options) => {
104217
104399
  if (!isAlphaNumericAndHyphens(options.appName)) {
104218
104400
  console.error("App name must be alphanumeric and hyphens only");
@@ -104232,38 +104414,38 @@ var init_v2 = __esm({
104232
104414
  }
104233
104415
  const orgName = options.orgName.toLowerCase();
104234
104416
  const projectPascalCase = camelCase(projectName, { pascalCase: true });
104235
- const projectDir = path9.resolve(options.outputDirectory, !options.skipSubDir ? options.directoryName || projectName : "");
104417
+ const projectDir = path11.resolve(options.outputDirectory, !options.skipSubDir ? options.directoryName || projectName : "");
104236
104418
  console.log(`Creating new ${options.template.replace(/-/gi, " ")} Seeka app in ${projectDir}`);
104237
104419
  console.log("");
104238
- if (!options.skipSubDir && fs12.existsSync(projectDir) && isEmptyDir(projectDir) === false) {
104420
+ if (!options.skipSubDir && fs14.existsSync(projectDir) && isEmptyDir(projectDir) === false) {
104239
104421
  if (options.force) {
104240
104422
  console.log("--force was used and destination directory is not empty. Clearing out the directory");
104241
- const gitDirPath = path9.resolve(projectDir, ".git");
104242
- const gitDirExists = fs12.existsSync(gitDirPath);
104423
+ const gitDirPath = path11.resolve(projectDir, ".git");
104424
+ const gitDirExists = fs14.existsSync(gitDirPath);
104243
104425
  if (gitDirExists) {
104244
104426
  console.info(".git directory found in directory, I will preserve it and remove all other files and directories to prepare for the app creation");
104245
104427
  }
104246
- const items = fs12.readdirSync(projectDir);
104428
+ const items = fs14.readdirSync(projectDir);
104247
104429
  for (const item of items) {
104248
104430
  if (item === ".git") {
104249
104431
  continue;
104250
104432
  }
104251
- const itemPath = path9.resolve(projectDir, item);
104252
- fs12.rmSync(itemPath, { recursive: true, force: true });
104433
+ const itemPath = path11.resolve(projectDir, item);
104434
+ fs14.rmSync(itemPath, { recursive: true, force: true });
104253
104435
  }
104254
104436
  } else {
104255
104437
  console.error("Directory is not empty. Use --force to create app in non-empty directory");
104256
104438
  return;
104257
104439
  }
104258
104440
  }
104259
- if (!fs12.existsSync(projectDir)) {
104260
- fs12.mkdirSync(projectDir, { recursive: true });
104441
+ if (!fs14.existsSync(projectDir)) {
104442
+ fs14.mkdirSync(projectDir, { recursive: true });
104261
104443
  }
104262
- const templateZipPath = path9.resolve(__dirname, "init-template.zip");
104263
- const templateDir = fs12.mkdtempSync(path9.join(os4.tmpdir(), "seeka-init-template-"));
104444
+ const templateZipPath = path11.resolve(__dirname, "init-template.zip");
104445
+ const templateDir = fs14.mkdtempSync(path11.join(os4.tmpdir(), "seeka-init-template-"));
104264
104446
  console.log("Extracting template...");
104265
104447
  await extractZipFileToDirectory(templateZipPath, templateDir);
104266
- const scaffoldOutputDir = options.skipSubDir ? fs12.mkdtempSync(path9.join(os4.tmpdir(), "seeka-app-init-v2-")) : projectDir;
104448
+ const scaffoldOutputDir = options.skipSubDir ? fs14.mkdtempSync(path11.join(os4.tmpdir(), "seeka-app-init-v2-")) : projectDir;
104267
104449
  const scaffolder = new SeekaAppScaffolder();
104268
104450
  await scaffolder.scaffoldSeekaApp({
104269
104451
  templateDir,
@@ -104386,8 +104568,8 @@ var init_v2 = __esm({
104386
104568
  ]
104387
104569
  });
104388
104570
  if (options.skipSubDir) {
104389
- fs12.cpSync(scaffoldOutputDir, projectDir, { recursive: true });
104390
- fs12.rmSync(scaffoldOutputDir, { recursive: true, force: true });
104571
+ fs14.cpSync(scaffoldOutputDir, projectDir, { recursive: true });
104572
+ fs14.rmSync(scaffoldOutputDir, { recursive: true, force: true });
104391
104573
  }
104392
104574
  if (options.installDependencies) {
104393
104575
  console.info("Installing package dependencies");
@@ -104397,7 +104579,7 @@ var init_v2 = __esm({
104397
104579
  console.error("Error installing package dependencies", err);
104398
104580
  }
104399
104581
  }
104400
- const yarnRcFilePath = path9.resolve(projectDir, ".yarnrc.yml");
104582
+ const yarnRcFilePath = path11.resolve(projectDir, ".yarnrc.yml");
104401
104583
  let npmAuthToken = "<< GET TOKEN FROM https://seeka.app/settings/integrations/api >>";
104402
104584
  if (!options.npmUsername || !options.npmPassword) {
104403
104585
  console.warn('npmUsername and npmPassword was not provided. Either delete the "browser" directory from the app template before installing dependencies or get your NPM login from https://seeka.app/settings/integrations/api');
@@ -104405,7 +104587,7 @@ var init_v2 = __esm({
104405
104587
  console.log("Using NPM registry username " + options.npmUsername);
104406
104588
  npmAuthToken = `${options.npmUsername}:${options.npmPassword}`;
104407
104589
  }
104408
- fs12.writeFileSync(
104590
+ fs14.writeFileSync(
104409
104591
  yarnRcFilePath,
104410
104592
  `nodeLinker: node-modules
104411
104593
 
@@ -104416,14 +104598,14 @@ npmScopes:
104416
104598
  npmRegistryServer: "https://npm.packages.seeka.services"`,
104417
104599
  { encoding: "utf8" }
104418
104600
  );
104419
- const yarnLockFilePath = path9.resolve(projectDir, "yarn.lock");
104420
- fs12.writeFileSync(yarnLockFilePath, "", { encoding: "utf8" });
104421
- const seekaDir = path9.join(projectDir, ".seeka");
104422
- if (!fs12.existsSync(seekaDir)) {
104423
- fs12.mkdirSync(seekaDir, { recursive: true });
104601
+ const yarnLockFilePath = path11.resolve(projectDir, "yarn.lock");
104602
+ fs14.writeFileSync(yarnLockFilePath, "", { encoding: "utf8" });
104603
+ const seekaDir = path11.join(projectDir, ".seeka");
104604
+ if (!fs14.existsSync(seekaDir)) {
104605
+ fs14.mkdirSync(seekaDir, { recursive: true });
104424
104606
  }
104425
104607
  const { environmentVariables, ...otherOptions } = options;
104426
- const configPath = path9.join(seekaDir, "init.app.seeka.cli.config.json");
104608
+ const configPath = path11.join(seekaDir, "init.app.seeka.cli.config.json");
104427
104609
  const configOutput = {
104428
104610
  ...otherOptions,
104429
104611
  sdk: {
@@ -104432,12 +104614,27 @@ npmScopes:
104432
104614
  };
104433
104615
  delete configOutput.textReplacements;
104434
104616
  delete configOutput.jsonActions;
104435
- fs12.writeFileSync(configPath, JSON.stringify(configOutput, null, 2), { encoding: "utf8" });
104436
- const secretsConfigPath = path9.join(seekaDir, "init.app.secrets.seeka.cli.config.json");
104617
+ fs14.writeFileSync(configPath, JSON.stringify(configOutput, null, 2), { encoding: "utf8" });
104618
+ const appConfig = {
104619
+ orgName: options.orgName,
104620
+ appName: options.appName,
104621
+ template: options.template
104622
+ };
104623
+ writeJsonFile(resolveAppConfigPath(projectDir), appConfig);
104624
+ const sdkConfig = {
104625
+ version,
104626
+ scaffoldedAt: (/* @__PURE__ */ new Date()).toISOString()
104627
+ };
104628
+ writeJsonFile(resolveSdkConfigPath(projectDir), sdkConfig);
104629
+ const secretsConfigPath = path11.join(seekaDir, "init.app.secrets.seeka.cli.config.json");
104437
104630
  const secretsConfigOutput = {
104438
104631
  environmentVariables: environmentVariables || {}
104439
104632
  };
104440
- fs12.writeFileSync(secretsConfigPath, JSON.stringify(secretsConfigOutput, null, 2), { encoding: "utf8" });
104633
+ fs14.writeFileSync(secretsConfigPath, JSON.stringify(secretsConfigOutput, null, 2), { encoding: "utf8" });
104634
+ const envConfig = {
104635
+ environmentVariables: environmentVariables || {}
104636
+ };
104637
+ writeJsonFile(resolveEnvironmentConfigPath(projectDir, "prod"), envConfig);
104441
104638
  console.log("");
104442
104639
  console.log("Installing AI context...");
104443
104640
  try {
@@ -104453,7 +104650,7 @@ npmScopes:
104453
104650
  console.log(`Created ${projectName} in ${projectDir}`);
104454
104651
  console.log("Boom! Your new Seeka app is ready!");
104455
104652
  writeSeparator();
104456
- const relativePath = options.skipSubDir ? projectDir : path9.relative(process.cwd(), projectDir);
104653
+ const relativePath = options.skipSubDir ? projectDir : path11.relative(process.cwd(), projectDir);
104457
104654
  console.log(`Run "cd ${relativePath}" to change to your apps directory and start creating some magic!`);
104458
104655
  console.log("");
104459
104656
  console.log("");
@@ -104465,7 +104662,7 @@ npmScopes:
104465
104662
  var version2;
104466
104663
  var init_package2 = __esm({
104467
104664
  "package.json"() {
104468
- version2 = "3.9.17";
104665
+ version2 = "3.10.0";
104469
104666
  }
104470
104667
  });
104471
104668
 
@@ -104511,7 +104708,7 @@ function cloneMainBranch(repoUrl, localAppPath, cwd, token) {
104511
104708
  runGitCommand(["clone", "--branch", "main", authenticatedUrl, localAppPath], cwd);
104512
104709
  }
104513
104710
  function ensureRepoReadyFromMain(localAppPath, repoUrl, token) {
104514
- const gitDirExists = fs13.existsSync(path10.join(localAppPath, ".git"));
104711
+ const gitDirExists = fs15.existsSync(path12.join(localAppPath, ".git"));
104515
104712
  if (gitDirExists) {
104516
104713
  console.log("\u{1F4C1} Existing git repository detected, updating remote...\n");
104517
104714
  } else {
@@ -104532,12 +104729,12 @@ function commitAll(localAppPath, message) {
104532
104729
  function pushDevBranch(localAppPath) {
104533
104730
  runGitCommand(["push", "-u", "origin", "dev"], localAppPath);
104534
104731
  }
104535
- var fs13, path10, spawn3;
104732
+ var fs15, path12, spawn3;
104536
104733
  var init_git = __esm({
104537
104734
  "src/github/commands/repo/init/git.ts"() {
104538
104735
  "use strict";
104539
- fs13 = __toESM(require("fs"), 1);
104540
- path10 = __toESM(require("path"), 1);
104736
+ fs15 = __toESM(require("fs"), 1);
104737
+ path12 = __toESM(require("path"), 1);
104541
104738
  spawn3 = __toESM(require_cross_spawn(), 1);
104542
104739
  }
104543
104740
  });
@@ -104561,22 +104758,41 @@ async function initAppCommand2(config) {
104561
104758
  validate: (input) => input.trim() !== "" || initAppCommand.interactive.localAppPath.validation.required
104562
104759
  }
104563
104760
  ]);
104564
- const resolvedLocalAppPath = path11.resolve(rawLocalAppPath);
104565
- const existingInitConfigPath = path11.join(resolvedLocalAppPath, DEFAULT_INIT_CONFIG_RELATIVE_PATH);
104566
- const existingSecretsConfigPath = path11.join(resolvedLocalAppPath, DEFAULT_SECRETS_CONFIG_RELATIVE_PATH);
104761
+ const resolvedLocalAppPath = path13.resolve(rawLocalAppPath);
104762
+ const existingInitConfigPath = path13.join(resolvedLocalAppPath, DEFAULT_INIT_CONFIG_RELATIVE_PATH);
104763
+ const existingSecretsConfigPath = path13.join(resolvedLocalAppPath, DEFAULT_SECRETS_CONFIG_RELATIVE_PATH);
104567
104764
  const existingInitConfig = readInitConfig(existingInitConfigPath) ?? {};
104568
104765
  const existingSecretsConfig = readInitConfig(existingSecretsConfigPath) ?? {};
104569
104766
  const existingEnvVars = existingSecretsConfig.environmentVariables ?? {};
104570
104767
  const mergedEnvVars = { ...existingEnvVars, ...config.environmentVariables ?? {} };
104571
104768
  let appName = config.appName ?? existingInitConfig.appName;
104572
104769
  let orgName = config.orgName ?? existingInitConfig.orgName;
104573
- const localAppPath = path11.resolve(rawLocalAppPath);
104574
- if (fs14.existsSync(localAppPath)) {
104575
- const files = fs14.readdirSync(localAppPath);
104770
+ const localAppPath = path13.resolve(rawLocalAppPath);
104771
+ let skipGitOperations = false;
104772
+ const gitDirPath = path13.join(localAppPath, ".git");
104773
+ if (fs16.existsSync(gitDirPath)) {
104774
+ console.log("\n\u26A0\uFE0F WARNING: Existing git repository detected in the target directory.\n");
104775
+ const { continueWithExistingRepo } = await dist_default12.prompt([
104776
+ {
104777
+ type: "confirm",
104778
+ name: "continueWithExistingRepo",
104779
+ message: "An initialized git repository already exists. Do you want to continue? (No git pull/push/fetch commands will be run)",
104780
+ default: false
104781
+ }
104782
+ ]);
104783
+ if (!continueWithExistingRepo) {
104784
+ console.log("\u274C Operation cancelled by user.");
104785
+ return;
104786
+ }
104787
+ skipGitOperations = true;
104788
+ console.log("\u2705 Continuing with existing git repository. Git operations will be skipped.\n");
104789
+ }
104790
+ if (fs16.existsSync(localAppPath)) {
104791
+ const files = fs16.readdirSync(localAppPath);
104576
104792
  if (files.length > 0) {
104577
- const isOnlySeeka = files.every((file) => file === ".seeka" || file === ".vscode" || file === ".idea");
104793
+ const isOnlySeeka = files.every((file) => file === ".seeka" || file === ".vscode" || file === ".idea" || file === ".git");
104578
104794
  if (!isOnlySeeka) {
104579
- throw new Error(`Directory ${localAppPath} is not empty and contains files other than .seeka or .idea or .vscode folders. Please provide an empty directory or one that only contains a .seeka/ folder.`);
104795
+ throw new Error(`Directory ${localAppPath} is not empty and contains files other than .seeka or .idea or .vscode or .git folders. Please provide an empty directory or one that only contains a .seeka/ or .git/ folder.`);
104580
104796
  }
104581
104797
  }
104582
104798
  }
@@ -104598,8 +104814,8 @@ async function initAppCommand2(config) {
104598
104814
  ]);
104599
104815
  appName = appName ?? nameAnswers.appName;
104600
104816
  orgName = orgName ?? nameAnswers.orgName;
104601
- const seekaDir2 = path11.join(resolvedLocalAppPath, ".seeka");
104602
- const localInitConfigPath2 = path11.join(seekaDir2, "init.app.seeka.cli.config.json");
104817
+ const seekaDir2 = path13.join(resolvedLocalAppPath, ".seeka");
104818
+ const localInitConfigPath2 = path13.join(seekaDir2, "init.app.seeka.cli.config.json");
104603
104819
  upsertInitConfig(localInitConfigPath2, { appName, orgName });
104604
104820
  }
104605
104821
  const answers = await dist_default12.prompt([
@@ -104712,6 +104928,36 @@ async function initAppCommand2(config) {
104712
104928
  name: "selfHostBaseUrl",
104713
104929
  message: sharedEnvConfigPrompts.selfHostBaseUrl.message,
104714
104930
  default: mergedEnvVars.SELF_HOST_BASEURL ?? `https://apps.seeka.services/${config.appName}`
104931
+ },
104932
+ {
104933
+ type: "input",
104934
+ name: "otelExporterOtlpTracesEndpoint",
104935
+ message: sharedEnvConfigPrompts.otelExporterOtlpTracesEndpoint.message,
104936
+ default: mergedEnvVars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ?? ""
104937
+ },
104938
+ {
104939
+ type: "input",
104940
+ name: "otelExporterOtlpTracesHeaders",
104941
+ message: sharedEnvConfigPrompts.otelExporterOtlpTracesHeaders.message,
104942
+ default: mergedEnvVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS ?? ""
104943
+ },
104944
+ {
104945
+ type: "input",
104946
+ name: "seekaIngestUrl",
104947
+ message: sharedEnvConfigPrompts.seekaIngestUrl.message,
104948
+ default: mergedEnvVars.SEEKA_INGEST_URL ?? ""
104949
+ },
104950
+ {
104951
+ type: "input",
104952
+ name: "seekaIssuerUrl",
104953
+ message: sharedEnvConfigPrompts.seekaIssuerUrl.message,
104954
+ default: mergedEnvVars.SEEKA_ISSUER_URL ?? ""
104955
+ },
104956
+ {
104957
+ type: "input",
104958
+ name: "seekaTelemetryUrl",
104959
+ message: sharedEnvConfigPrompts.seekaTelemetryUrl.message,
104960
+ default: mergedEnvVars.SEEKA_TELEMETRY_URL ?? ""
104715
104961
  }
104716
104962
  ]);
104717
104963
  const { azureFunctionResourceGroupName, viteBaseUrl } = answers;
@@ -104728,11 +104974,16 @@ async function initAppCommand2(config) {
104728
104974
  REDIS_CONNECTION_TLS: answers.redisConnectionTls,
104729
104975
  OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: answers.otelExporterOtlpLogsEndpoint,
104730
104976
  OTEL_EXPORTER_OTLP_LOGS_HEADERS: answers.otelExporterOtlpLogsHeaders,
104731
- SELF_HOST_BASEURL: answers.selfHostBaseUrl
104732
- };
104733
- const seekaDir = path11.join(localAppPath, ".seeka");
104734
- const localInitConfigPath = path11.join(seekaDir, "init.app.seeka.cli.config.json");
104735
- const localSecretsConfigPath = path11.join(seekaDir, "init.app.secrets.seeka.cli.config.json");
104977
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: answers.otelExporterOtlpTracesEndpoint,
104978
+ OTEL_EXPORTER_OTLP_TRACES_HEADERS: answers.otelExporterOtlpTracesHeaders,
104979
+ SELF_HOST_BASEURL: answers.selfHostBaseUrl,
104980
+ SEEKA_INGEST_URL: answers.seekaIngestUrl,
104981
+ SEEKA_ISSUER_URL: answers.seekaIssuerUrl,
104982
+ SEEKA_TELEMETRY_URL: answers.seekaTelemetryUrl
104983
+ };
104984
+ const seekaDir = path13.join(localAppPath, ".seeka");
104985
+ const localInitConfigPath = path13.join(seekaDir, "init.app.seeka.cli.config.json");
104986
+ const localSecretsConfigPath = path13.join(seekaDir, "init.app.secrets.seeka.cli.config.json");
104736
104987
  console.log(`
104737
104988
  \u{1F4C1} Pre-creating config files at: ${seekaDir}
104738
104989
  `);
@@ -104747,7 +104998,15 @@ async function initAppCommand2(config) {
104747
104998
  contextPackageUrl: config.contextPackageUrl,
104748
104999
  azureFunctionResourceGroupName
104749
105000
  });
105001
+ const newAppConfig = { orgName, appName, template: "azure-function" };
105002
+ writeJsonFile(resolveAppConfigPath(localAppPath), newAppConfig);
105003
+ const newSdkConfig = { version: version2, scaffoldedAt: (/* @__PURE__ */ new Date()).toISOString() };
105004
+ writeJsonFile(resolveSdkConfigPath(localAppPath), newSdkConfig);
105005
+ const localEnvSecretsPath = path13.join(seekaDir, "environments", "prod.secrets.seeka.cli.config.json");
105006
+ upsertSecretsConfig(localEnvSecretsPath, envVars);
104750
105007
  upsertSecretsConfig(localSecretsConfigPath, envVars);
105008
+ const newProdEnvConfig = { environmentVariables: envVars };
105009
+ writeJsonFile(resolveEnvironmentConfigPath(localAppPath, "prod"), newProdEnvConfig);
104751
105010
  console.log("\u{1F4A1} If the command fails, you can re-run it with:");
104752
105011
  console.log(` seeka-azure init-app --configFile "${localInitConfigPath}"
104753
105012
  `);
@@ -104776,7 +105035,9 @@ async function initAppCommand2(config) {
104776
105035
  private: true,
104777
105036
  org: selectedOwner
104778
105037
  });
104779
- await setRepositoryVariables(octokit, owner, repo, [
105038
+ const prodEnvironmentName = `prod`;
105039
+ await createEnvironment(octokit, owner, repo, prodEnvironmentName);
105040
+ await setEnvironmentVariables(octokit, owner, repo, prodEnvironmentName, [
104780
105041
  {
104781
105042
  name: "AZURE_FUNC_RESOURCE_NAME",
104782
105043
  value: `seeka-app-${appName}`
@@ -104786,13 +105047,12 @@ async function initAppCommand2(config) {
104786
105047
  value: azureFunctionResourceGroupName
104787
105048
  }
104788
105049
  ]);
104789
- const prodEnvironmentName = `prod`;
104790
- await createEnvironment(octokit, owner, repo, prodEnvironmentName);
104791
105050
  const secretsToSet = [
104792
105051
  { name: "SEEKA_APP_CFG_DATA_ENCRYPTION_KEY", value: envVars.DATA_ENCRYPTION_KEY },
104793
105052
  { name: "SEEKA_APP_CFG_SEEKA_APP_SECRET", value: envVars.SEEKA_APP_SECRET },
104794
105053
  { name: "SEEKA_APP_CFG_REDIS_CONNECTION_PASSWORD", value: envVars.REDIS_CONNECTION_PASSWORD },
104795
- envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_LOGS_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS } : null
105054
+ envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_LOGS_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS } : null,
105055
+ envVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_TRACES_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS } : null
104796
105056
  ].filter((x2) => x2 !== null);
104797
105057
  await setEnvironmentSecrets(octokit, owner, repo, prodEnvironmentName, secretsToSet);
104798
105058
  await setEnvironmentVariables(octokit, owner, repo, prodEnvironmentName, [
@@ -104809,23 +105069,40 @@ async function initAppCommand2(config) {
104809
105069
  value: buildSeekaAppSettingsJson(envVars)
104810
105070
  }
104811
105071
  ]);
105072
+ const stagEnvironmentName = "stag";
105073
+ console.log(`
105074
+ \u{1F30D} Auto-creating staging environment: ${stagEnvironmentName}...`);
105075
+ await createEnvironment(octokit, owner, repo, stagEnvironmentName);
105076
+ await setEnvironmentVariables(octokit, owner, repo, stagEnvironmentName, [
105077
+ { name: "AZURE_FUNC_RESOURCE_NAME", value: `seeka-app-${appName}-staging` },
105078
+ { name: "AZURE_FUNC_RESOURCE_GROUP_NAME", value: "" },
105079
+ { name: "VITE_BASE_URL", value: viteBaseUrl },
105080
+ { name: "HOSTING_ENV_NAME", value: "stag" },
105081
+ { name: "SEEKA_APP_SETTINGS", value: "{}" }
105082
+ ]);
105083
+ console.log("\u2705 Staging environment created with placeholder values.");
105084
+ console.log(' Run `seeka-azure add-env` and select "staging" to configure staging secrets and variables.\n');
104812
105085
  console.log("\u2705 GitHub repository initialized successfully!\n");
104813
105086
  console.log(`Repository: https://github.com/${owner}/${repo}`);
104814
105087
  console.log(`Environment: ${prodEnvironmentName}
104815
105088
  `);
104816
- console.log(`
105089
+ if (!skipGitOperations) {
105090
+ console.log(`
104817
105091
  \u{1F4E5} Cloning repository to: ${localAppPath}
104818
105092
  `);
104819
- const repoUrl = `https://github.com/${owner}/${repo}.git`;
104820
- const seekaDirExists = fs14.existsSync(path11.join(localAppPath, ".seeka"));
104821
- if (seekaDirExists) {
104822
- console.log("\u{1F4C1} Directory has existing .seeka folder, preparing git repository from main...\n");
104823
- ensureRepoReadyFromMain(localAppPath, repoUrl, token);
105093
+ const repoUrl = `https://github.com/${owner}/${repo}.git`;
105094
+ const seekaDirExists = fs16.existsSync(path13.join(localAppPath, ".seeka"));
105095
+ if (seekaDirExists) {
105096
+ console.log("\u{1F4C1} Directory has existing .seeka folder, preparing git repository from main...\n");
105097
+ ensureRepoReadyFromMain(localAppPath, repoUrl, token);
105098
+ } else {
105099
+ cloneMainBranch(repoUrl, localAppPath, process.cwd(), token);
105100
+ }
105101
+ console.log('\n\u{1F33F} Creating and switching to "dev" branch...\n');
105102
+ createOrResetDevBranch(localAppPath);
104824
105103
  } else {
104825
- cloneMainBranch(repoUrl, localAppPath, process.cwd(), token);
105104
+ console.log("\n\u23ED\uFE0F Skipping git clone/fetch operations (existing repo detected).\n");
104826
105105
  }
104827
- console.log('\n\u{1F33F} Creating and switching to "dev" branch...\n');
104828
- createOrResetDevBranch(localAppPath);
104829
105106
  console.log("\n\u{1F916} Installing AI context...\n");
104830
105107
  await aiContextCommand({
104831
105108
  targetDir: localAppPath,
@@ -104849,32 +105126,47 @@ async function initAppCommand2(config) {
104849
105126
  azureFunctionResourceGroupName
104850
105127
  };
104851
105128
  await initCommandV2(initOptions);
104852
- console.log("\n\u{1F4DD} Creating initial commit...\n");
104853
- const commitMessage = `Initial scaffold from Seeka app SDK v${version2}`;
104854
- commitAll(localAppPath, commitMessage);
104855
- console.log(`\u2705 Initial commit created: "${commitMessage}"`);
104856
- console.log("\n\u{1F680} Pushing to remote...\n");
104857
- pushDevBranch(localAppPath);
104858
- console.log("\n\u2705 Seeka app initialized successfully!\n");
104859
- console.log(`\u{1F3E0} Local directory: ${localAppPath}`);
104860
- console.log(`\u{1F4E6} Repository: https://github.com/${owner}/${repo}`);
104861
- console.log(`\u{1F33F} Branch "dev" pushed: https://github.com/${owner}/${repo}/tree/dev`);
104862
- console.log(`\u{1F30D} Environment: ${prodEnvironmentName}`);
104863
- console.log(`\u2699\uFE0F Repository variables: https://github.com/${owner}/${repo}/settings/variables/actions`);
104864
- console.log(`\u{1F310} Environment "${prodEnvironmentName}" settings: https://github.com/${owner}/${repo}/settings/environments
105129
+ if (!skipGitOperations) {
105130
+ console.log("\n\u{1F4DD} Creating initial commit...\n");
105131
+ const commitMessage = `Initial scaffold from Seeka app SDK v${version2}`;
105132
+ commitAll(localAppPath, commitMessage);
105133
+ console.log(`\u2705 Initial commit created: "${commitMessage}"`);
105134
+ console.log("\n\u{1F680} Pushing to remote...\n");
105135
+ pushDevBranch(localAppPath);
105136
+ console.log("\n\u2705 Seeka app initialized successfully!\n");
105137
+ console.log(`\u{1F3E0} Local directory: ${localAppPath}`);
105138
+ console.log(`\u{1F4E6} Repository: https://github.com/${owner}/${repo}`);
105139
+ console.log(`\u{1F33F} Branch "dev" pushed: https://github.com/${owner}/${repo}/tree/dev`);
105140
+ console.log(`\u{1F30D} Environment: ${prodEnvironmentName}`);
105141
+ console.log(`\u{1F30D} Staging environment: ${stagEnvironmentName} (placeholder - run add-env to configure)`);
105142
+ console.log(`\u2699\uFE0F Repository variables: https://github.com/${owner}/${repo}/settings/variables/actions`);
105143
+ console.log(`\u{1F310} Environment "${prodEnvironmentName}" settings: https://github.com/${owner}/${repo}/settings/environments
105144
+ `);
105145
+ } else {
105146
+ console.log("\n\u23ED\uFE0F Skipping git commit and push operations (existing repo detected).\n");
105147
+ console.log("\n\u2705 Seeka app initialized successfully!\n");
105148
+ console.log(`\u{1F3E0} Local directory: ${localAppPath}`);
105149
+ console.log(`\u{1F4E6} Repository: https://github.com/${owner}/${repo}`);
105150
+ console.log(`\u{1F30D} Environment: ${prodEnvironmentName}`);
105151
+ console.log(`\u{1F30D} Staging environment: ${stagEnvironmentName} (placeholder - run add-env to configure)`);
105152
+ console.log(`\u2699\uFE0F Repository variables: https://github.com/${owner}/${repo}/settings/variables/actions`);
105153
+ console.log(`\u{1F310} Environment "${prodEnvironmentName}" settings: https://github.com/${owner}/${repo}/settings/environments`);
105154
+ console.log(`
105155
+ \u26A0\uFE0F Note: You are using an existing git repository. Please manually commit and push your changes when ready.
104865
105156
  `);
105157
+ }
104866
105158
  } catch (error) {
104867
105159
  console.error("\n\u274C Failed to initialize app:", error.message);
104868
105160
  throw error;
104869
105161
  }
104870
105162
  }
104871
- var path11, fs14, import_crypto2;
105163
+ var path13, fs16, import_crypto2;
104872
105164
  var init_init = __esm({
104873
105165
  "src/github/commands/repo/init/index.ts"() {
104874
105166
  "use strict";
104875
105167
  init_dist16();
104876
- path11 = __toESM(require("path"), 1);
104877
- fs14 = __toESM(require("fs"), 1);
105168
+ path13 = __toESM(require("path"), 1);
105169
+ fs16 = __toESM(require("fs"), 1);
104878
105170
  import_crypto2 = require("crypto");
104879
105171
  init_auth();
104880
105172
  init_repo();
@@ -104886,6 +105178,7 @@ var init_init = __esm({
104886
105178
  init_context();
104887
105179
  init_package2();
104888
105180
  init_git();
105181
+ init_seeka_dir();
104889
105182
  }
104890
105183
  });
104891
105184
 
@@ -104899,6 +105192,28 @@ function generateGuidNoHyphens2() {
104899
105192
  }
104900
105193
  async function initEnvironmentCommand(config) {
104901
105194
  try {
105195
+ const envTypeAnswer = config.environmentType ? { environmentType: config.environmentType } : await dist_default12.prompt([
105196
+ {
105197
+ type: "select",
105198
+ name: "environmentType",
105199
+ message: addEnvCommand.interactive.environmentType.message,
105200
+ default: "production",
105201
+ choices: [
105202
+ { name: "Production", value: "production" },
105203
+ { name: "Staging", value: "staging" }
105204
+ ]
105205
+ }
105206
+ ]);
105207
+ const environmentType = envTypeAnswer.environmentType;
105208
+ const isStaging = environmentType === "staging";
105209
+ const defaultEnvName = isStaging ? "stag" : "prod";
105210
+ const envSecretsPath = resolveEnvironmentSecretsConfigPath(defaultEnvName);
105211
+ let envSecretsConfig = readInitConfig(envSecretsPath);
105212
+ if (!envSecretsConfig && !isStaging) {
105213
+ const legacyPath = resolveSecretsConfigPath();
105214
+ envSecretsConfig = readInitConfig(legacyPath);
105215
+ }
105216
+ const envDefaults = isStaging ? {} : envSecretsConfig?.environmentVariables ?? {};
104902
105217
  const answers = await dist_default12.prompt([
104903
105218
  {
104904
105219
  type: "input",
@@ -104917,7 +105232,7 @@ async function initEnvironmentCommand(config) {
104917
105232
  type: "input",
104918
105233
  name: "environmentName",
104919
105234
  message: addEnvCommand.interactive.environmentName.message,
104920
- default: `prod`,
105235
+ default: isStaging ? "stag" : "prod",
104921
105236
  validate: (input) => input.trim() !== "" || addEnvCommand.interactive.environmentName.validation.required
104922
105237
  },
104923
105238
  {
@@ -104929,9 +105244,10 @@ async function initEnvironmentCommand(config) {
104929
105244
  },
104930
105245
  {
104931
105246
  type: "input",
104932
- name: "azureFuncSlotName",
104933
- message: addEnvCommand.interactive.azureFuncSlotName.message,
104934
- default: ""
105247
+ name: "azureFuncResourceName",
105248
+ message: sharedEnvConfigPrompts.azureFuncResourceName.message,
105249
+ default: isStaging ? `seeka-app-${config.appName}-staging` : `seeka-app-${config.appName}`,
105250
+ validate: (input) => input.trim() !== "" || sharedEnvConfigPrompts.azureFuncResourceName.validation.required
104935
105251
  },
104936
105252
  {
104937
105253
  type: "input",
@@ -104956,78 +105272,108 @@ async function initEnvironmentCommand(config) {
104956
105272
  type: "input",
104957
105273
  name: "hostingEnvName",
104958
105274
  message: addEnvCommand.interactive.hostingEnvName.message,
104959
- default: "prod",
105275
+ default: isStaging ? "stag" : "prod",
104960
105276
  validate: (input) => input.trim() !== "" || addEnvCommand.interactive.hostingEnvName.validation.required
104961
105277
  },
104962
105278
  {
104963
105279
  type: "input",
104964
105280
  name: "seekaAppId",
104965
105281
  message: sharedEnvConfigPrompts.seekaAppId.message,
104966
- default: config.environmentVariables?.SEEKA_APP_ID ?? "",
105282
+ default: envDefaults.SEEKA_APP_ID ?? "",
104967
105283
  validate: (input) => input.trim() !== "" || sharedEnvConfigPrompts.seekaAppId.validation.required
104968
105284
  },
104969
105285
  {
104970
105286
  type: "input",
104971
105287
  name: "seekaAppSecret",
104972
105288
  message: sharedEnvConfigPrompts.seekaAppSecret.message,
104973
- default: config.environmentVariables?.SEEKA_APP_SECRET ?? "",
105289
+ default: envDefaults.SEEKA_APP_SECRET ?? "",
104974
105290
  validate: (input) => input.trim() !== "" || sharedEnvConfigPrompts.seekaAppSecret.validation.required
104975
105291
  },
104976
105292
  {
104977
105293
  type: "input",
104978
105294
  name: "dataEncryptionKey",
104979
105295
  message: sharedEnvConfigPrompts.dataEncryptionKey.message,
104980
- default: config.environmentVariables?.DATA_ENCRYPTION_KEY ?? ""
105296
+ default: envDefaults.DATA_ENCRYPTION_KEY ?? ""
104981
105297
  },
104982
105298
  {
104983
105299
  type: "input",
104984
105300
  name: "redisConnectionHost",
104985
105301
  message: sharedEnvConfigPrompts.redisConnectionHost.message,
104986
- default: config.environmentVariables?.REDIS_CONNECTION_HOST ?? "",
105302
+ default: envDefaults.REDIS_CONNECTION_HOST ?? "",
104987
105303
  validate: (input) => input.trim() !== "" || sharedEnvConfigPrompts.redisConnectionHost.validation.required
104988
105304
  },
104989
105305
  {
104990
105306
  type: "input",
104991
105307
  name: "redisConnectionPort",
104992
105308
  message: sharedEnvConfigPrompts.redisConnectionPort.message,
104993
- default: config.environmentVariables?.REDIS_CONNECTION_PORT ?? "6379"
105309
+ default: envDefaults.REDIS_CONNECTION_PORT ?? "6379"
104994
105310
  },
104995
105311
  {
104996
105312
  type: "input",
104997
105313
  name: "redisConnectionUser",
104998
105314
  message: sharedEnvConfigPrompts.redisConnectionUser.message,
104999
- default: config.environmentVariables?.REDIS_CONNECTION_USER ?? "default"
105315
+ default: envDefaults.REDIS_CONNECTION_USER ?? "default"
105000
105316
  },
105001
105317
  {
105002
105318
  type: "input",
105003
105319
  name: "redisConnectionPassword",
105004
105320
  message: sharedEnvConfigPrompts.redisConnectionPassword.message,
105005
- default: config.environmentVariables?.REDIS_CONNECTION_PASSWORD ?? "",
105321
+ default: envDefaults.REDIS_CONNECTION_PASSWORD ?? "",
105006
105322
  validate: (input) => input.trim() !== "" || sharedEnvConfigPrompts.redisConnectionPassword.validation.required
105007
105323
  },
105008
105324
  {
105009
105325
  type: "input",
105010
105326
  name: "redisConnectionTls",
105011
105327
  message: sharedEnvConfigPrompts.redisConnectionTls.message,
105012
- default: config.environmentVariables?.REDIS_CONNECTION_TLS ?? "true"
105328
+ default: envDefaults.REDIS_CONNECTION_TLS ?? "true"
105013
105329
  },
105014
105330
  {
105015
105331
  type: "input",
105016
105332
  name: "otelExporterOtlpLogsEndpoint",
105017
105333
  message: sharedEnvConfigPrompts.otelExporterOtlpLogsEndpoint.message,
105018
- default: config.environmentVariables?.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT ?? ""
105334
+ default: envDefaults.OTEL_EXPORTER_OTLP_LOGS_ENDPOINT ?? ""
105019
105335
  },
105020
105336
  {
105021
105337
  type: "input",
105022
105338
  name: "otelExporterOtlpLogsHeaders",
105023
105339
  message: sharedEnvConfigPrompts.otelExporterOtlpLogsHeaders.message,
105024
- default: config.environmentVariables?.OTEL_EXPORTER_OTLP_LOGS_HEADERS ?? ""
105340
+ default: envDefaults.OTEL_EXPORTER_OTLP_LOGS_HEADERS ?? ""
105025
105341
  },
105026
105342
  {
105027
105343
  type: "input",
105028
105344
  name: "selfHostBaseUrl",
105029
105345
  message: sharedEnvConfigPrompts.selfHostBaseUrl.message,
105030
- default: config.environmentVariables?.SELF_HOST_BASEURL ?? `https://apps.seeka.services/${config.appName}`
105346
+ default: isStaging ? `https://apps.seeka.services/${config.appName}-staging` : envDefaults.SELF_HOST_BASEURL ?? `https://apps.seeka.services/${config.appName}`
105347
+ },
105348
+ {
105349
+ type: "input",
105350
+ name: "otelExporterOtlpTracesEndpoint",
105351
+ message: sharedEnvConfigPrompts.otelExporterOtlpTracesEndpoint.message,
105352
+ default: envDefaults.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ?? ""
105353
+ },
105354
+ {
105355
+ type: "input",
105356
+ name: "otelExporterOtlpTracesHeaders",
105357
+ message: sharedEnvConfigPrompts.otelExporterOtlpTracesHeaders.message,
105358
+ default: envDefaults.OTEL_EXPORTER_OTLP_TRACES_HEADERS ?? ""
105359
+ },
105360
+ {
105361
+ type: "input",
105362
+ name: "seekaIngestUrl",
105363
+ message: sharedEnvConfigPrompts.seekaIngestUrl.message,
105364
+ default: envDefaults.SEEKA_INGEST_URL ?? ""
105365
+ },
105366
+ {
105367
+ type: "input",
105368
+ name: "seekaIssuerUrl",
105369
+ message: sharedEnvConfigPrompts.seekaIssuerUrl.message,
105370
+ default: envDefaults.SEEKA_ISSUER_URL ?? ""
105371
+ },
105372
+ {
105373
+ type: "input",
105374
+ name: "seekaTelemetryUrl",
105375
+ message: sharedEnvConfigPrompts.seekaTelemetryUrl.message,
105376
+ default: envDefaults.SEEKA_TELEMETRY_URL ?? ""
105031
105377
  }
105032
105378
  ]);
105033
105379
  const { octokit } = await authenticateWithGitHub();
@@ -105037,16 +105383,28 @@ async function initEnvironmentCommand(config) {
105037
105383
  appName: config.appName,
105038
105384
  azureFunctionResourceGroupName: answers.azureFunctionResourceGroupName
105039
105385
  });
105040
- await setRepositoryVariables(octokit, answers.owner, answers.repo, [
105386
+ await setEnvironmentVariables(octokit, answers.owner, answers.repo, answers.environmentName, [
105387
+ {
105388
+ name: "AZURE_FUNC_RESOURCE_NAME",
105389
+ value: answers.azureFuncResourceName
105390
+ },
105041
105391
  {
105042
105392
  name: "AZURE_FUNC_RESOURCE_GROUP_NAME",
105043
105393
  value: answers.azureFunctionResourceGroupName
105044
105394
  }
105045
105395
  ]);
105396
+ try {
105397
+ await deleteRepositoryVariable(octokit, answers.owner, answers.repo, "AZURE_FUNC_RESOURCE_NAME");
105398
+ await deleteRepositoryVariable(octokit, answers.owner, answers.repo, "AZURE_FUNC_RESOURCE_GROUP_NAME");
105399
+ console.log("\n\u26A0\uFE0F Repo-level AZURE_FUNC_RESOURCE_NAME and AZURE_FUNC_RESOURCE_GROUP_NAME have been removed.");
105400
+ console.log(" Ensure your other environment also has these variables set at environment-level.");
105401
+ console.log(" Run `seeka-azure update-env` for the other environment if needed.\n");
105402
+ } catch {
105403
+ }
105046
105404
  await createEnvironment(octokit, answers.owner, answers.repo, answers.environmentName);
105047
105405
  const dataEncryptionKey = answers.dataEncryptionKey || generateGuidNoHyphens2();
105048
105406
  const envVars = {
105049
- ...config.environmentVariables ?? {},
105407
+ ...isStaging ? {} : config.environmentVariables ?? {},
105050
105408
  SEEKA_APP_ID: answers.seekaAppId,
105051
105409
  SEEKA_APP_SECRET: answers.seekaAppSecret,
105052
105410
  DATA_ENCRYPTION_KEY: dataEncryptionKey,
@@ -105057,28 +105415,26 @@ async function initEnvironmentCommand(config) {
105057
105415
  REDIS_CONNECTION_TLS: answers.redisConnectionTls,
105058
105416
  OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: answers.otelExporterOtlpLogsEndpoint,
105059
105417
  OTEL_EXPORTER_OTLP_LOGS_HEADERS: answers.otelExporterOtlpLogsHeaders,
105060
- SELF_HOST_BASEURL: answers.selfHostBaseUrl
105061
- };
105062
- const secretsConfigPath = resolveSecretsConfigPath();
105418
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: answers.otelExporterOtlpTracesEndpoint,
105419
+ OTEL_EXPORTER_OTLP_TRACES_HEADERS: answers.otelExporterOtlpTracesHeaders,
105420
+ SELF_HOST_BASEURL: answers.selfHostBaseUrl,
105421
+ SEEKA_INGEST_URL: answers.seekaIngestUrl,
105422
+ SEEKA_ISSUER_URL: answers.seekaIssuerUrl,
105423
+ SEEKA_TELEMETRY_URL: answers.seekaTelemetryUrl
105424
+ };
105425
+ const secretsConfigPath = resolveEnvironmentSecretsConfigPath(answers.environmentName);
105063
105426
  upsertSecretsConfig(secretsConfigPath, envVars);
105427
+ const newEnvConfig = { environmentVariables: envVars };
105428
+ writeJsonFile(resolveEnvironmentConfigPath(process.cwd(), answers.environmentName), newEnvConfig);
105064
105429
  const secretsToSet = [
105065
105430
  { name: "SEEKA_APP_CFG_DATA_ENCRYPTION_KEY", value: envVars.DATA_ENCRYPTION_KEY },
105066
105431
  { name: "SEEKA_APP_CFG_SEEKA_APP_SECRET", value: envVars.SEEKA_APP_SECRET },
105067
105432
  { name: "SEEKA_APP_CFG_REDIS_CONNECTION_PASSWORD", value: envVars.REDIS_CONNECTION_PASSWORD },
105068
- envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_LOGS_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS } : null
105433
+ envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_LOGS_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS } : null,
105434
+ envVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_TRACES_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS } : null
105069
105435
  ].filter((x2) => x2 !== null);
105070
105436
  await setEnvironmentSecrets(octokit, answers.owner, answers.repo, answers.environmentName, secretsToSet);
105071
- const shouldDeleteAzureFuncSlot = answers.azureFuncSlotName === "";
105072
- if (shouldDeleteAzureFuncSlot) {
105073
- console.log("\n\u{1F5D1} Deleting AZURE_FUNC_SLOT_NAME (empty for production default)...");
105074
- await deleteEnvironmentVariable(octokit, answers.owner, answers.repo, answers.environmentName, "AZURE_FUNC_SLOT_NAME");
105075
- }
105076
105437
  await setEnvironmentVariables(octokit, answers.owner, answers.repo, answers.environmentName, [
105077
- // Only include AZURE_FUNC_SLOT_NAME if not being deleted
105078
- ...shouldDeleteAzureFuncSlot ? [] : [{
105079
- name: "AZURE_FUNC_SLOT_NAME",
105080
- value: answers.azureFuncSlotName
105081
- }],
105082
105438
  {
105083
105439
  name: "VITE_BASE_URL",
105084
105440
  value: answers.viteBaseUrl
@@ -105121,6 +105477,7 @@ var init_init2 = __esm({
105121
105477
  init_help_texts();
105122
105478
  init_seekaAppSettings();
105123
105479
  init_initConfig();
105480
+ init_seeka_dir();
105124
105481
  }
105125
105482
  });
105126
105483
 
@@ -105170,12 +105527,14 @@ async function updateEnvironmentCommand(config) {
105170
105527
  appName: config.appName,
105171
105528
  azureFunctionResourceGroupName: answers.azureFunctionResourceGroupName
105172
105529
  });
105173
- await setRepositoryVariables(octokit, answers.owner, answers.repo, [
105174
- {
105175
- name: "AZURE_FUNC_RESOURCE_GROUP_NAME",
105176
- value: answers.azureFunctionResourceGroupName
105177
- }
105178
- ]);
105530
+ try {
105531
+ await deleteRepositoryVariable(octokit, answers.owner, answers.repo, "AZURE_FUNC_RESOURCE_NAME");
105532
+ await deleteRepositoryVariable(octokit, answers.owner, answers.repo, "AZURE_FUNC_RESOURCE_GROUP_NAME");
105533
+ console.log("\n\u26A0\uFE0F Repo-level AZURE_FUNC_RESOURCE_NAME and AZURE_FUNC_RESOURCE_GROUP_NAME have been removed.");
105534
+ console.log(" Ensure your other environment also has these variables set at environment-level.");
105535
+ console.log(" Run `seeka-azure update-env` for the other environment if needed.\n");
105536
+ } catch {
105537
+ }
105179
105538
  await createEnvironment(octokit, answers.owner, answers.repo, answers.environmentName);
105180
105539
  const existingVariables = await listEnvironmentVariables(
105181
105540
  octokit,
@@ -105191,13 +105550,21 @@ async function updateEnvironmentCommand(config) {
105191
105550
  );
105192
105551
  const existingVarMap = new Map(existingVariables.map((v2) => [v2.name, v2.value]));
105193
105552
  const existingSecretSet = new Set(existingSecrets);
105194
- const configEnvVars = config.environmentVariables ?? {};
105553
+ const envSecretsPath = resolveEnvironmentSecretsConfigPath(answers.environmentName);
105554
+ let envSecretsConfig = readInitConfig(envSecretsPath);
105555
+ if (!envSecretsConfig && answers.environmentName === "prod") {
105556
+ const legacyPath = resolveSecretsConfigPath();
105557
+ envSecretsConfig = readInitConfig(legacyPath);
105558
+ }
105559
+ const configEnvVars = envSecretsConfig?.environmentVariables ?? config.environmentVariables ?? {};
105560
+ const isStaging = answers.environmentName === "stag" || answers.environmentName === "staging";
105195
105561
  const additionalAnswers = await dist_default12.prompt([
105196
105562
  {
105197
105563
  type: "input",
105198
- name: "azureFuncSlotName",
105199
- message: updateEnvCommand.interactive.azureFuncSlotName.message,
105200
- default: configEnvVars.AZURE_FUNC_SLOT_NAME ?? ""
105564
+ name: "azureFuncResourceName",
105565
+ message: sharedEnvConfigPrompts.azureFuncResourceName.message,
105566
+ default: isStaging ? `seeka-app-${config.appName}-staging` : `seeka-app-${config.appName}`,
105567
+ validate: (input) => input.trim() !== "" || sharedEnvConfigPrompts.azureFuncResourceName.validation.required
105201
105568
  },
105202
105569
  {
105203
105570
  type: "input",
@@ -105267,10 +105634,39 @@ async function updateEnvironmentCommand(config) {
105267
105634
  type: "input",
105268
105635
  name: "selfHostBaseUrl",
105269
105636
  message: sharedEnvConfigPrompts.selfHostBaseUrl.message,
105270
- default: configEnvVars.SELF_HOST_BASEURL ?? `https://apps.seeka.services/${config.appName}`
105637
+ default: isStaging ? `https://apps.seeka.services/${config.appName}-staging` : configEnvVars.SELF_HOST_BASEURL ?? `https://apps.seeka.services/${config.appName}`
105638
+ },
105639
+ {
105640
+ type: "input",
105641
+ name: "otelExporterOtlpTracesEndpoint",
105642
+ message: sharedEnvConfigPrompts.otelExporterOtlpTracesEndpoint.message,
105643
+ default: configEnvVars.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ?? ""
105644
+ },
105645
+ {
105646
+ type: "input",
105647
+ name: "otelExporterOtlpTracesHeaders",
105648
+ message: sharedEnvConfigPrompts.otelExporterOtlpTracesHeaders.message,
105649
+ default: configEnvVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS ?? ""
105650
+ },
105651
+ {
105652
+ type: "input",
105653
+ name: "seekaIngestUrl",
105654
+ message: sharedEnvConfigPrompts.seekaIngestUrl.message,
105655
+ default: configEnvVars.SEEKA_INGEST_URL ?? ""
105656
+ },
105657
+ {
105658
+ type: "input",
105659
+ name: "seekaIssuerUrl",
105660
+ message: sharedEnvConfigPrompts.seekaIssuerUrl.message,
105661
+ default: configEnvVars.SEEKA_ISSUER_URL ?? ""
105662
+ },
105663
+ {
105664
+ type: "input",
105665
+ name: "seekaTelemetryUrl",
105666
+ message: sharedEnvConfigPrompts.seekaTelemetryUrl.message,
105667
+ default: configEnvVars.SEEKA_TELEMETRY_URL ?? ""
105271
105668
  }
105272
105669
  ]);
105273
- const azureFuncSlotName = additionalAnswers.azureFuncSlotName;
105274
105670
  const dataEncryptionKey = additionalAnswers.dataEncryptionKey || generateGuidNoHyphens3();
105275
105671
  const envVars = {
105276
105672
  ...configEnvVars,
@@ -105284,24 +105680,27 @@ async function updateEnvironmentCommand(config) {
105284
105680
  REDIS_CONNECTION_TLS: additionalAnswers.redisConnectionTls,
105285
105681
  OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: additionalAnswers.otelExporterOtlpLogsEndpoint,
105286
105682
  OTEL_EXPORTER_OTLP_LOGS_HEADERS: additionalAnswers.otelExporterOtlpLogsHeaders,
105287
- SELF_HOST_BASEURL: additionalAnswers.selfHostBaseUrl
105288
- };
105289
- const secretsConfigPath = resolveSecretsConfigPath();
105683
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: additionalAnswers.otelExporterOtlpTracesEndpoint,
105684
+ OTEL_EXPORTER_OTLP_TRACES_HEADERS: additionalAnswers.otelExporterOtlpTracesHeaders,
105685
+ SELF_HOST_BASEURL: additionalAnswers.selfHostBaseUrl,
105686
+ SEEKA_INGEST_URL: additionalAnswers.seekaIngestUrl,
105687
+ SEEKA_ISSUER_URL: additionalAnswers.seekaIssuerUrl,
105688
+ SEEKA_TELEMETRY_URL: additionalAnswers.seekaTelemetryUrl
105689
+ };
105690
+ const secretsConfigPath = resolveEnvironmentSecretsConfigPath(answers.environmentName);
105290
105691
  upsertSecretsConfig(secretsConfigPath, envVars);
105692
+ const newEnvConfig = { environmentVariables: envVars };
105693
+ writeJsonFile(resolveEnvironmentConfigPath(process.cwd(), answers.environmentName), newEnvConfig);
105291
105694
  const secretsToSet = [
105292
105695
  { name: "SEEKA_APP_CFG_DATA_ENCRYPTION_KEY", value: envVars.DATA_ENCRYPTION_KEY },
105293
105696
  { name: "SEEKA_APP_CFG_SEEKA_APP_SECRET", value: envVars.SEEKA_APP_SECRET },
105294
105697
  { name: "SEEKA_APP_CFG_REDIS_CONNECTION_PASSWORD", value: envVars.REDIS_CONNECTION_PASSWORD },
105295
- envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_LOGS_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS } : null
105698
+ envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_LOGS_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_LOGS_HEADERS } : null,
105699
+ envVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS ? { name: "SEEKA_APP_CFG_OTEL_EXPORTER_OTLP_TRACES_HEADERS", value: envVars.OTEL_EXPORTER_OTLP_TRACES_HEADERS } : null
105296
105700
  ].filter((x2) => x2 !== null);
105297
- const shouldDeleteAzureFuncSlot = azureFuncSlotName === "";
105298
- if (shouldDeleteAzureFuncSlot) {
105299
- console.log("\n\u{1F5D1} Deleting AZURE_FUNC_SLOT_NAME (empty for production default)...");
105300
- await deleteEnvironmentVariable(octokit, answers.owner, answers.repo, answers.environmentName, "AZURE_FUNC_SLOT_NAME");
105301
- }
105302
105701
  const variablesToSet = [
105303
- // Only include AZURE_FUNC_SLOT_NAME if not being deleted
105304
- ...shouldDeleteAzureFuncSlot ? [] : [{ name: "AZURE_FUNC_SLOT_NAME", value: azureFuncSlotName }],
105702
+ { name: "AZURE_FUNC_RESOURCE_NAME", value: additionalAnswers.azureFuncResourceName },
105703
+ { name: "AZURE_FUNC_RESOURCE_GROUP_NAME", value: answers.azureFunctionResourceGroupName },
105305
105704
  { name: "VITE_BASE_URL", value: envVars.VITE_BASE_URL ?? `/${config.appName}/app/` },
105306
105705
  { name: "VITE_URLS_SEEKA_API_CORE", value: envVars.VITE_URLS_SEEKA_API_CORE ?? "" },
105307
105706
  { name: "VITE_URLS_SEEKA_APP_CORE_ORIGIN", value: envVars.VITE_URLS_SEEKA_APP_CORE_ORIGIN ?? "https://seeka.app" },
@@ -105370,6 +105769,7 @@ var init_update = __esm({
105370
105769
  init_help_texts();
105371
105770
  init_seekaAppSettings();
105372
105771
  init_initConfig();
105772
+ init_seeka_dir();
105373
105773
  }
105374
105774
  });
105375
105775
 
@@ -105404,14 +105804,14 @@ var {
105404
105804
  init_console();
105405
105805
  init_help_texts();
105406
105806
  init_dist16();
105407
- var fs15 = __toESM(require("fs"), 1);
105408
- var path12 = __toESM(require("path"), 1);
105807
+ var fs17 = __toESM(require("fs"), 1);
105808
+ var path14 = __toESM(require("path"), 1);
105409
105809
  init_initConfig();
105410
105810
  async function loadConfig(configFilePath) {
105411
105811
  try {
105412
105812
  const configPath = resolveInitConfigPath(configFilePath);
105413
- if (fs15.existsSync(configPath)) {
105414
- const configContent = fs15.readFileSync(configPath, "utf-8");
105813
+ if (fs17.existsSync(configPath)) {
105814
+ const configContent = fs17.readFileSync(configPath, "utf-8");
105415
105815
  const config = JSON.parse(configContent);
105416
105816
  console.log(`Using config file: ${configPath}`);
105417
105817
  return { ...config, __configPath: configPath };
@@ -105435,7 +105835,7 @@ async function getConfig(configFilePath) {
105435
105835
  console.log(` App Name: ${config.appName}
105436
105836
  `);
105437
105837
  if (config.__configPath) {
105438
- config.localAppPath = path12.dirname(path12.dirname(config.__configPath));
105838
+ config.localAppPath = path14.dirname(path14.dirname(config.__configPath));
105439
105839
  }
105440
105840
  } else {
105441
105841
  const defaultPath = configFilePath || `./${DEFAULT_INIT_CONFIG_RELATIVE_PATH}`;