@awsless/awsless 0.0.445 → 0.0.447

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/client.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  createProxy
3
3
  } from "./chunk-2LRBH7VV.js";
4
- import "./chunk-JSBRDJBE.js";
5
4
 
6
5
  // src/lib/client/auth.ts
7
6
  import { constantCase } from "change-case";
@@ -1 +1 @@
1
- 78731c42d1c2b6ee145a017c2f6c37bee4d55851
1
+ 10e2b69d2315f12a13babfd6ae9dd7aaf76b3b24
Binary file
package/dist/prebuild.js CHANGED
@@ -4,7 +4,10 @@ import { dirname as dirname2, join as join2 } from "path";
4
4
  import { fileURLToPath } from "url";
5
5
 
6
6
  // src/feature/function/prebuild.ts
7
- import { Asset, aws } from "@awsless/formation";
7
+ import { days, seconds, toDays, toSeconds } from "@awsless/duration";
8
+ import { $, Future, resolveInputs } from "@awsless/formation";
9
+ import { mebibytes, toMebibytes } from "@awsless/size";
10
+ import { pascalCase } from "change-case";
8
11
  import { writeFile } from "fs/promises";
9
12
  import { join } from "path";
10
13
 
package/dist/server.js CHANGED
@@ -1,10 +1,9 @@
1
- import {
2
- createProxy
3
- } from "./chunk-2LRBH7VV.js";
4
1
  import {
5
2
  CommandOptions
6
3
  } from "./chunk-QL4FTNZ7.js";
7
- import "./chunk-JSBRDJBE.js";
4
+ import {
5
+ createProxy
6
+ } from "./chunk-2LRBH7VV.js";
8
7
 
9
8
  // src/lib/mock/alert.ts
10
9
  import { mockSNS } from "@awsless/sns";
@@ -14,7 +13,7 @@ import { stringify } from "@awsless/json";
14
13
  import { publish } from "@awsless/sns";
15
14
 
16
15
  // src/lib/server/util.ts
17
- import { paramCase } from "change-case";
16
+ import { kebabCase } from "change-case";
18
17
  var APP = process.env.APP ?? "app";
19
18
  var STACK = process.env.STACK ?? "stack";
20
19
  var build = (opt) => {
@@ -26,7 +25,7 @@ var build = (opt) => {
26
25
  opt.resourceType,
27
26
  opt.resourceName,
28
27
  opt?.postfix
29
- ].filter((v) => typeof v === "string").map((v) => paramCase(v)).join(opt.seperator ?? "--");
28
+ ].filter((v) => typeof v === "string").map((v) => kebabCase(v)).join(opt.seperator ?? "--");
30
29
  };
31
30
  var bindPostfixedLocalResourceName = (resourceType, postfix) => {
32
31
  return (resourceName, stackName = STACK) => {
@@ -351,7 +350,7 @@ var Cache = /* @__PURE__ */ createProxy((stack) => {
351
350
 
352
351
  // src/lib/server/config.ts
353
352
  import { ssm } from "@awsless/ssm";
354
- import { paramCase as paramCase2 } from "change-case";
353
+ import { kebabCase as kebabCase2 } from "change-case";
355
354
  var getConfigName = (name) => {
356
355
  return `/.awsless/${APP}/${name}`;
357
356
  };
@@ -367,7 +366,7 @@ var loadConfigData = /* @__NO_SIDE_EFFECTS__ */ async () => {
367
366
  if (keys.length > 0) {
368
367
  const paths = {};
369
368
  for (const key of keys) {
370
- paths[paramCase2(key)] = getConfigName(key);
369
+ paths[kebabCase2(key)] = getConfigName(key);
371
370
  }
372
371
  return ssm(paths);
373
372
  }
@@ -376,7 +375,7 @@ var loadConfigData = /* @__NO_SIDE_EFFECTS__ */ async () => {
376
375
  };
377
376
  var data = await /* @__PURE__ */ loadConfigData();
378
377
  var getConfigValue = (name) => {
379
- const key = paramCase2(name);
378
+ const key = kebabCase2(name);
380
379
  const value = data[key];
381
380
  if (typeof value === "undefined") {
382
381
  throw new Error(
@@ -386,7 +385,7 @@ var getConfigValue = (name) => {
386
385
  return value;
387
386
  };
388
387
  var setConfigValue = (name, value) => {
389
- const key = paramCase2(name);
388
+ const key = kebabCase2(name);
390
389
  data[key] = value;
391
390
  };
392
391
  var Config = /* @__PURE__ */ new Proxy(
@@ -484,8 +483,8 @@ var pubsubAuthorizerResponse = (props) => {
484
483
  return {
485
484
  isAuthenticated: props.authorized,
486
485
  principalId: props.principalId ?? Date.now().toString(),
487
- disconnectAfterInSeconds: Number(toSeconds(props.disconnectAfter ?? hours(1))),
488
- refreshAfterInSeconds: Number(toSeconds(props.disconnectAfter ?? hours(1))),
486
+ disconnectAfterInSeconds: toSeconds(props.disconnectAfter ?? hours(1)),
487
+ refreshAfterInSeconds: toSeconds(props.disconnectAfter ?? hours(1)),
489
488
  policyDocuments
490
489
  };
491
490
  };