monorise 0.1.0 → 1.0.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/base/index.d.ts +6 -2
- package/dist/base/index.js.map +1 -1
- package/dist/core/index.d.ts +26 -5
- package/dist/core/index.js +112 -6
- package/dist/core/index.js.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/alb.d.ts +280 -0
- package/dist/sst/.sst/platform/src/components/aws/alb.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket-route.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts +13 -2
- package/dist/sst/.sst/platform/src/components/aws/apigateway-websocket.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-authorizer.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1-lambda-route.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts +93 -83
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-authorizer.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2-lambda-route.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts +8 -2
- package/dist/sst/.sst/platform/src/components/aws/apigatewayv2.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync-data-source.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/app-sync.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts +18 -0
- package/dist/sst/.sst/platform/src/components/aws/aurora.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/auth-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/auth.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket-notification.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts +13 -8
- package/dist/sst/.sst/platform/src/components/aws/bucket.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts +3 -2
- package/dist/sst/.sst/platform/src/components/aws/bus-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts +34 -3
- package/dist/sst/.sst/platform/src/components/aws/bus.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/cdn.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts +59 -1
- package/dist/sst/.sst/platform/src/components/aws/cluster.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-identity-pool.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts +100 -0
- package/dist/sst/.sst/platform/src/components/aws/cognito-user-pool.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/cron-v2.d.ts +325 -0
- package/dist/sst/.sst/platform/src/components/aws/cron-v2.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts +15 -6
- package/dist/sst/.sst/platform/src/components/aws/cron.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/dsql.d.ts +369 -0
- package/dist/sst/.sst/platform/src/components/aws/dsql.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/dynamo-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts +63 -3
- package/dist/sst/.sst/platform/src/components/aws/dynamo.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/email.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts +95 -4
- package/dist/sst/.sst/platform/src/components/aws/fargate.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts +121 -21
- package/dist/sst/.sst/platform/src/components/aws/function.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts +11 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/arn.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/container-builder.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts +7 -3
- package/dist/sst/.sst/platform/src/components/aws/helpers/function-builder.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/load-balancer.d.ts +9 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/load-balancer.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts +2 -2
- package/dist/sst/.sst/platform/src/components/aws/helpers/provider.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/site-builder.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/helpers/subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/https-redirect.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts +4 -0
- package/dist/sst/.sst/platform/src/components/aws/index.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts +8 -3
- package/dist/sst/.sst/platform/src/components/aws/kinesis-stream.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/linkable.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts +34 -5
- package/dist/sst/.sst/platform/src/components/aws/mysql.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts +39 -5
- package/dist/sst/.sst/platform/src/components/aws/nextjs.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/nuxt.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts +12 -1
- package/dist/sst/.sst/platform/src/components/aws/open-search.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts +7 -3
- package/dist/sst/.sst/platform/src/components/aws/opencontrol.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/permission.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts +13 -2
- package/dist/sst/.sst/platform/src/components/aws/postgres-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts +34 -5
- package/dist/sst/.sst/platform/src/components/aws/postgres.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts +6 -1
- package/dist/sst/.sst/platform/src/components/aws/queue-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts +10 -1
- package/dist/sst/.sst/platform/src/components/aws/queue.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts +6 -1
- package/dist/sst/.sst/platform/src/components/aws/realtime.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts +10 -0
- package/dist/sst/.sst/platform/src/components/aws/redis-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts +14 -0
- package/dist/sst/.sst/platform/src/components/aws/redis.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts +482 -2
- package/dist/sst/.sst/platform/src/components/aws/router.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/service-v1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts +125 -0
- package/dist/sst/.sst/platform/src/components/aws/service.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic-lambda-subscriber.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts +6 -1
- package/dist/sst/.sst/platform/src/components/aws/sns-topic.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts +7 -7
- package/dist/sst/.sst/platform/src/components/aws/ssr-site.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/static-site.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions/state.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts +10 -2
- package/dist/sst/.sst/platform/src/components/aws/step-functions/task.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/step-functions.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts +20 -6
- package/dist/sst/.sst/platform/src/components/aws/tan-stack-start.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts +35 -15
- package/dist/sst/.sst/platform/src/components/aws/task.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts +5 -0
- package/dist/sst/.sst/platform/src/components/aws/vector.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts +51 -4
- package/dist/sst/.sst/platform/src/components/aws/vpc.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/aws/workflow.d.ts +331 -0
- package/dist/sst/.sst/platform/src/components/aws/workflow.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ai.d.ts +82 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/ai.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts +15 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/binding.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts +4 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/bucket.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts +29 -5
- package/dist/sst/.sst/platform/src/components/cloudflare/cron.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts +37 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/d1.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/index.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts +36 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/kv.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-placement.d.ts +27 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/worker-placement.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/providers/zone-lookup.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/queue-worker-subscriber.d.ts +116 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue-worker-subscriber.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts +186 -3
- package/dist/sst/.sst/platform/src/components/cloudflare/queue.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts +2 -2
- package/dist/sst/.sst/platform/src/components/cloudflare/static-site.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts +39 -5
- package/dist/sst/.sst/platform/src/components/cloudflare/worker.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/component.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/duration.d.ts +2 -0
- package/dist/sst/.sst/platform/src/components/duration.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/esbuild.d.ts +3 -0
- package/dist/sst/.sst/platform/src/components/esbuild.d.ts.map +1 -0
- package/dist/sst/.sst/platform/src/components/link.d.ts +2 -2
- package/dist/sst/.sst/platform/src/components/link.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/linkable.d.ts +32 -2
- package/dist/sst/.sst/platform/src/components/linkable.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/rpc/rpc.d.ts.map +1 -1
- package/dist/sst/.sst/platform/src/components/vercel/dns.d.ts +2 -2
- package/dist/sst/.sst/platform/src/util/minify.d.ts +2 -0
- package/dist/sst/.sst/platform/src/util/minify.d.ts.map +1 -0
- package/dist/sst/components/q-function.d.ts +2 -3
- package/dist/sst/components/q-function.d.ts.map +1 -1
- package/dist/sst/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts +0 -7
- package/dist/sst/.sst/platform/src/components/aws/helpers/quota.d.ts.map +0 -1
|
@@ -2,6 +2,7 @@ import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
|
2
2
|
import { Component, Prettify, Transform } from "../component";
|
|
3
3
|
import { Input } from "../input";
|
|
4
4
|
import { Link } from "../link";
|
|
5
|
+
import { Dns } from "../dns";
|
|
5
6
|
import { CognitoIdentityProvider } from "./cognito-identity-provider";
|
|
6
7
|
import { CognitoUserPoolClient } from "./cognito-user-pool-client";
|
|
7
8
|
import { FunctionArgs, FunctionArn } from "./function.js";
|
|
@@ -314,6 +315,71 @@ export interface CognitoUserPoolArgs {
|
|
|
314
315
|
* ```
|
|
315
316
|
*/
|
|
316
317
|
triggers?: Input<Prettify<Triggers>>;
|
|
318
|
+
/**
|
|
319
|
+
* Configure a domain for the User Pool's hosted UI.
|
|
320
|
+
*
|
|
321
|
+
* You can use either a Cognito-provided prefix domain or your own custom domain.
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
*
|
|
325
|
+
* Add a Cognito prefix domain.
|
|
326
|
+
*
|
|
327
|
+
* ```ts
|
|
328
|
+
* {
|
|
329
|
+
* domain: {
|
|
330
|
+
* prefix: "my-app-dev"
|
|
331
|
+
* }
|
|
332
|
+
* }
|
|
333
|
+
* ```
|
|
334
|
+
*
|
|
335
|
+
* This creates a domain at `my-app-dev.auth.{region}.amazoncognito.com`.
|
|
336
|
+
*
|
|
337
|
+
* Add a custom domain. By default, creates an ACM certificate and configures
|
|
338
|
+
* DNS records using Route 53.
|
|
339
|
+
*
|
|
340
|
+
* ```ts
|
|
341
|
+
* {
|
|
342
|
+
* domain: "auth.example.com"
|
|
343
|
+
* }
|
|
344
|
+
* ```
|
|
345
|
+
*
|
|
346
|
+
* Use a domain hosted on Cloudflare.
|
|
347
|
+
*
|
|
348
|
+
* ```ts
|
|
349
|
+
* {
|
|
350
|
+
* domain: {
|
|
351
|
+
* name: "auth.example.com",
|
|
352
|
+
* dns: sst.cloudflare.dns()
|
|
353
|
+
* }
|
|
354
|
+
* }
|
|
355
|
+
* ```
|
|
356
|
+
*/
|
|
357
|
+
domain?: Input<string | {
|
|
358
|
+
/**
|
|
359
|
+
* Use an Amazon Cognito prefix domain. Creates a domain at
|
|
360
|
+
* `{prefix}.auth.{region}.amazoncognito.com`.
|
|
361
|
+
*
|
|
362
|
+
* Cannot contain "aws", "amazon", or "cognito".
|
|
363
|
+
*/
|
|
364
|
+
prefix: Input<string>;
|
|
365
|
+
} | {
|
|
366
|
+
/**
|
|
367
|
+
* The custom domain name. Must be a subdomain (e.g., `auth.example.com`).
|
|
368
|
+
*/
|
|
369
|
+
name: Input<string>;
|
|
370
|
+
/**
|
|
371
|
+
* The DNS provider for automatic certificate validation and record creation.
|
|
372
|
+
* Set to `false` for manual DNS setup.
|
|
373
|
+
*
|
|
374
|
+
* @default `sst.aws.dns`
|
|
375
|
+
*/
|
|
376
|
+
dns?: Input<false | (Dns & {})>;
|
|
377
|
+
/**
|
|
378
|
+
* ARN of an existing ACM certificate in `us-east-1`. By default, a certificate
|
|
379
|
+
* is created and validated automatically.
|
|
380
|
+
*/
|
|
381
|
+
cert?: Input<string>;
|
|
382
|
+
}>;
|
|
317
383
|
/**
|
|
318
384
|
* [Transform](/docs/components#transform) how this component creates its underlying
|
|
319
385
|
* resources.
|
|
@@ -323,6 +389,10 @@ export interface CognitoUserPoolArgs {
|
|
|
323
389
|
* Transform the Cognito User Pool resource.
|
|
324
390
|
*/
|
|
325
391
|
userPool?: Transform<cognito.UserPoolArgs>;
|
|
392
|
+
/**
|
|
393
|
+
* Transform the Cognito User Pool domain resource.
|
|
394
|
+
*/
|
|
395
|
+
domain?: Transform<cognito.UserPoolDomainArgs>;
|
|
326
396
|
};
|
|
327
397
|
}
|
|
328
398
|
export interface CognitoIdentityProviderArgs {
|
|
@@ -430,6 +500,26 @@ export interface CognitoUserPoolClientArgs {
|
|
|
430
500
|
* });
|
|
431
501
|
* ```
|
|
432
502
|
*
|
|
503
|
+
* #### Add a hosted UI domain
|
|
504
|
+
*
|
|
505
|
+
* Use a Cognito prefix domain for the hosted UI.
|
|
506
|
+
*
|
|
507
|
+
* ```ts title="sst.config.ts"
|
|
508
|
+
* new sst.aws.CognitoUserPool("MyUserPool", {
|
|
509
|
+
* domain: {
|
|
510
|
+
* prefix: "my-app-dev"
|
|
511
|
+
* }
|
|
512
|
+
* });
|
|
513
|
+
* ```
|
|
514
|
+
*
|
|
515
|
+
* Or use your own custom domain.
|
|
516
|
+
*
|
|
517
|
+
* ```ts title="sst.config.ts"
|
|
518
|
+
* new sst.aws.CognitoUserPool("MyUserPool", {
|
|
519
|
+
* domain: "auth.example.com"
|
|
520
|
+
* });
|
|
521
|
+
* ```
|
|
522
|
+
*
|
|
433
523
|
* #### Configure triggers
|
|
434
524
|
*
|
|
435
525
|
* ```ts title="sst.config.ts"
|
|
@@ -471,6 +561,7 @@ export interface CognitoUserPoolClientArgs {
|
|
|
471
561
|
export declare class CognitoUserPool extends Component implements Link.Linkable {
|
|
472
562
|
private constructorOpts;
|
|
473
563
|
private userPool;
|
|
564
|
+
private _domainUrl?;
|
|
474
565
|
constructor(name: string, args?: CognitoUserPoolArgs, opts?: ComponentResourceOptions);
|
|
475
566
|
/**
|
|
476
567
|
* The Cognito User Pool ID.
|
|
@@ -480,6 +571,10 @@ export declare class CognitoUserPool extends Component implements Link.Linkable
|
|
|
480
571
|
* The Cognito User Pool ARN.
|
|
481
572
|
*/
|
|
482
573
|
get arn(): Output<string>;
|
|
574
|
+
/**
|
|
575
|
+
* If a `domain` is configured, this is the full URL of the hosted UI.
|
|
576
|
+
*/
|
|
577
|
+
get domainUrl(): Output<string> | undefined;
|
|
483
578
|
/**
|
|
484
579
|
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
485
580
|
*/
|
|
@@ -563,6 +658,11 @@ export declare class CognitoUserPool extends Component implements Link.Linkable
|
|
|
563
658
|
effect?: "allow" | "deny" | undefined;
|
|
564
659
|
actions: string[];
|
|
565
660
|
resources: Input<Input<string>[]>;
|
|
661
|
+
conditions?: Input<Input<{
|
|
662
|
+
test: Input<string>;
|
|
663
|
+
variable: Input<string>;
|
|
664
|
+
values: Input<Input<string>[]>;
|
|
665
|
+
}>[]> | undefined;
|
|
566
666
|
type: "aws.permission";
|
|
567
667
|
}[];
|
|
568
668
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cognito-user-pool.d.ts","sourceRoot":"","sources":["../../../../../../.sst/platform/src/components/aws/cognito-user-pool.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"cognito-user-pool.d.ts","sourceRoot":"","sources":["../../../../../../.sst/platform/src/components/aws/cognito-user-pool.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,MAAM,EAIP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAY,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAE,OAAO,EAA2B,MAAM,aAAa,CAAC;AAO/D,UAAU,QAAQ;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,YAAY,GAA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zB,IAAI,CAAC,EAAE,wBAAwB;CAalC"}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
2
|
+
import { Component, Transform } from "../component";
|
|
3
|
+
import { Function, FunctionArgs, FunctionArn } from "./function.js";
|
|
4
|
+
import { Input } from "../input.js";
|
|
5
|
+
import { iam, scheduler } from "@pulumi/aws";
|
|
6
|
+
import { Task } from "./task";
|
|
7
|
+
import { Workflow } from "./workflow.js";
|
|
8
|
+
export interface CronV2Args {
|
|
9
|
+
/**
|
|
10
|
+
* The function that'll be executed when the cron job runs.
|
|
11
|
+
* @deprecated Use `function` instead.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* {
|
|
17
|
+
* job: "src/cron.handler"
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* You can pass in the full function props.
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* {
|
|
25
|
+
* job: {
|
|
26
|
+
* handler: "src/cron.handler",
|
|
27
|
+
* timeout: "60 seconds"
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* You can also pass in a function ARN.
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* {
|
|
36
|
+
* job: "arn:aws:lambda:us-east-1:000000000000:function:my-sst-app-jayair-MyFunction",
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
job?: Input<string | Workflow | Function | FunctionArgs | FunctionArn>;
|
|
41
|
+
/**
|
|
42
|
+
* The function that'll be executed when the cron job runs.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* {
|
|
48
|
+
* function: "src/cron.handler"
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* You can pass in the full function props.
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
* {
|
|
56
|
+
* function: {
|
|
57
|
+
* handler: "src/cron.handler",
|
|
58
|
+
* timeout: "60 seconds"
|
|
59
|
+
* }
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* You can also pass in a function ARN.
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* {
|
|
67
|
+
* function: "arn:aws:lambda:us-east-1:000000000000:function:my-sst-app-jayair-MyFunction",
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
function?: Input<string | Workflow | Function | FunctionArgs | FunctionArn>;
|
|
72
|
+
/**
|
|
73
|
+
* The task that'll be executed when the cron job runs.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
*
|
|
77
|
+
* For example, let's say you have a task.
|
|
78
|
+
*
|
|
79
|
+
* ```js title="sst.config.ts"
|
|
80
|
+
* const cluster = new sst.aws.Cluster("MyCluster");
|
|
81
|
+
* const task = new sst.aws.Task("MyTask", { cluster });
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* You can then pass in the task to the cron job.
|
|
85
|
+
*
|
|
86
|
+
* ```js title="sst.config.ts"
|
|
87
|
+
* new sst.aws.CronV2("MyCronJob", {
|
|
88
|
+
* task,
|
|
89
|
+
* schedule: "rate(1 minute)"
|
|
90
|
+
* });
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
task?: Task;
|
|
95
|
+
/**
|
|
96
|
+
* The event that'll be passed to the function or task.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* {
|
|
101
|
+
* event: {
|
|
102
|
+
* foo: "bar",
|
|
103
|
+
* }
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* For Lambda functions, the event will be passed to the function as an event.
|
|
108
|
+
*
|
|
109
|
+
* ```ts
|
|
110
|
+
* function handler(event) {
|
|
111
|
+
* console.log(event.foo);
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* For ECS Fargate tasks, the event will be passed to the task as the `SST_EVENT`
|
|
116
|
+
* environment variable.
|
|
117
|
+
*
|
|
118
|
+
* ```ts
|
|
119
|
+
* const event = JSON.parse(process.env.SST_EVENT);
|
|
120
|
+
* console.log(event.foo);
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
event?: Input<any>;
|
|
124
|
+
/**
|
|
125
|
+
* The schedule for the cron job.
|
|
126
|
+
*
|
|
127
|
+
* :::note
|
|
128
|
+
* The cron job continues to run even after you exit `sst dev`.
|
|
129
|
+
* :::
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
*
|
|
133
|
+
* You can use a [rate expression](https://docs.aws.amazon.com/lambda/latest/dg/services-cloudwatchevents-expressions.html).
|
|
134
|
+
*
|
|
135
|
+
* ```ts
|
|
136
|
+
* {
|
|
137
|
+
* schedule: "rate(5 minutes)"
|
|
138
|
+
* // schedule: "rate(1 minute)"
|
|
139
|
+
* // schedule: "rate(5 minutes)"
|
|
140
|
+
* // schedule: "rate(1 hour)"
|
|
141
|
+
* // schedule: "rate(5 hours)"
|
|
142
|
+
* // schedule: "rate(1 day)"
|
|
143
|
+
* // schedule: "rate(5 days)"
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
* Or a [cron expression](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html#eb-cron-expressions).
|
|
147
|
+
*
|
|
148
|
+
* ```ts
|
|
149
|
+
* {
|
|
150
|
+
* schedule: "cron(15 10 * * ? *)", // 10:15 AM (UTC) every day
|
|
151
|
+
* }
|
|
152
|
+
* ```
|
|
153
|
+
*
|
|
154
|
+
* Or an [at expression](https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html#one-time) for a one-time schedule.
|
|
155
|
+
*
|
|
156
|
+
* ```ts
|
|
157
|
+
* {
|
|
158
|
+
* schedule: "at(2025-06-01T10:00:00)",
|
|
159
|
+
* }
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
schedule: Input<`rate(${string})` | `cron(${string})` | `at(${string})`>;
|
|
163
|
+
/**
|
|
164
|
+
* The IANA timezone for the cron schedule. When set, the cron expression is
|
|
165
|
+
* evaluated in this timezone, with automatic DST handling.
|
|
166
|
+
*
|
|
167
|
+
* @default `"UTC"`
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* {
|
|
171
|
+
* timezone: "America/New_York"
|
|
172
|
+
* }
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
timezone?: Input<string>;
|
|
176
|
+
/**
|
|
177
|
+
* Configures whether the cron job is enabled. When disabled, the cron job won't run.
|
|
178
|
+
* @default true
|
|
179
|
+
* @example
|
|
180
|
+
* ```ts
|
|
181
|
+
* {
|
|
182
|
+
* enabled: false
|
|
183
|
+
* }
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
enabled?: Input<boolean>;
|
|
187
|
+
/**
|
|
188
|
+
* The number of retry attempts for failed invocations. Between 0 and 185.
|
|
189
|
+
*
|
|
190
|
+
* @default `0`
|
|
191
|
+
* @example
|
|
192
|
+
* ```ts
|
|
193
|
+
* {
|
|
194
|
+
* retries: 3
|
|
195
|
+
* }
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
retries?: Input<number>;
|
|
199
|
+
/**
|
|
200
|
+
* The ARN of an SQS queue to use as a dead-letter queue. When all retry
|
|
201
|
+
* attempts are exhausted, failed events are sent to this queue.
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts
|
|
205
|
+
* {
|
|
206
|
+
* dlq: myQueue.arn
|
|
207
|
+
* }
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
dlq?: Input<string>;
|
|
211
|
+
/**
|
|
212
|
+
* [Transform](/docs/components#transform) how this component creates its underlying resources.
|
|
213
|
+
*/
|
|
214
|
+
transform?: {
|
|
215
|
+
/**
|
|
216
|
+
* Transform the EventBridge Scheduler Schedule resource.
|
|
217
|
+
*/
|
|
218
|
+
schedule?: Transform<scheduler.ScheduleArgs>;
|
|
219
|
+
/**
|
|
220
|
+
* Transform the IAM Role resource.
|
|
221
|
+
*/
|
|
222
|
+
role?: Transform<iam.RoleArgs>;
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* The `CronV2` component lets you add cron jobs to your app
|
|
227
|
+
* using [Amazon EventBridge Scheduler](https://docs.aws.amazon.com/scheduler/latest/UserGuide/what-is-scheduler.html). The cron job can invoke a `Function` or a container `Task`.
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* #### Cron job function
|
|
231
|
+
*
|
|
232
|
+
* Pass in a `schedule` and a `function` that'll be executed.
|
|
233
|
+
*
|
|
234
|
+
* ```ts title="sst.config.ts"
|
|
235
|
+
* new sst.aws.CronV2("MyCronJob", {
|
|
236
|
+
* function: "src/cron.handler",
|
|
237
|
+
* schedule: "rate(1 minute)"
|
|
238
|
+
* });
|
|
239
|
+
* ```
|
|
240
|
+
*
|
|
241
|
+
* #### Cron job container task
|
|
242
|
+
*
|
|
243
|
+
* Create a container task and pass in a `schedule` and a `task` that'll be executed.
|
|
244
|
+
*
|
|
245
|
+
* ```ts title="sst.config.ts" {5}
|
|
246
|
+
* const cluster = new sst.aws.Cluster("MyCluster");
|
|
247
|
+
* const task = new sst.aws.Task("MyTask", { cluster });
|
|
248
|
+
*
|
|
249
|
+
* new sst.aws.CronV2("MyCronJob", {
|
|
250
|
+
* task,
|
|
251
|
+
* schedule: "rate(1 day)"
|
|
252
|
+
* });
|
|
253
|
+
* ```
|
|
254
|
+
*
|
|
255
|
+
* #### Set a timezone
|
|
256
|
+
*
|
|
257
|
+
* ```ts title="sst.config.ts"
|
|
258
|
+
* new sst.aws.CronV2("MyCronJob", {
|
|
259
|
+
* function: "src/cron.handler",
|
|
260
|
+
* schedule: "cron(15 10 * * ? *)",
|
|
261
|
+
* timezone: "America/New_York"
|
|
262
|
+
* });
|
|
263
|
+
* ```
|
|
264
|
+
*
|
|
265
|
+
* #### Configure retries
|
|
266
|
+
*
|
|
267
|
+
* ```ts title="sst.config.ts"
|
|
268
|
+
* new sst.aws.CronV2("MyCronJob", {
|
|
269
|
+
* function: "src/cron.handler",
|
|
270
|
+
* schedule: "rate(1 minute)",
|
|
271
|
+
* retries: 3
|
|
272
|
+
* });
|
|
273
|
+
* ```
|
|
274
|
+
*
|
|
275
|
+
* #### One-time schedule
|
|
276
|
+
*
|
|
277
|
+
* ```ts title="sst.config.ts"
|
|
278
|
+
* new sst.aws.CronV2("MyCronJob", {
|
|
279
|
+
* function: "src/cron.handler",
|
|
280
|
+
* schedule: "at(2025-06-01T10:00:00)"
|
|
281
|
+
* });
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* #### Customize the function
|
|
285
|
+
*
|
|
286
|
+
* ```js title="sst.config.ts"
|
|
287
|
+
* new sst.aws.CronV2("MyCronJob", {
|
|
288
|
+
* schedule: "rate(1 minute)",
|
|
289
|
+
* function: {
|
|
290
|
+
* handler: "src/cron.handler",
|
|
291
|
+
* timeout: "60 seconds"
|
|
292
|
+
* }
|
|
293
|
+
* });
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
export declare class CronV2 extends Component {
|
|
297
|
+
private _name;
|
|
298
|
+
private fn?;
|
|
299
|
+
private _schedule;
|
|
300
|
+
private _role;
|
|
301
|
+
constructor(name: string, args: CronV2Args, opts?: ComponentResourceOptions);
|
|
302
|
+
/**
|
|
303
|
+
* The underlying [resources](/docs/components/#nodes) this component creates.
|
|
304
|
+
*/
|
|
305
|
+
get nodes(): {
|
|
306
|
+
/**
|
|
307
|
+
* The AWS Lambda Function that'll be invoked when the cron job runs.
|
|
308
|
+
* @deprecated Use `nodes.function` instead.
|
|
309
|
+
*/
|
|
310
|
+
readonly job: Output<Function>;
|
|
311
|
+
/**
|
|
312
|
+
* The AWS Lambda Function that'll be invoked when the cron job runs.
|
|
313
|
+
*/
|
|
314
|
+
readonly function: Output<Function>;
|
|
315
|
+
/**
|
|
316
|
+
* The EventBridge Scheduler Schedule resource.
|
|
317
|
+
*/
|
|
318
|
+
schedule: import("@pulumi/aws/scheduler/schedule").Schedule;
|
|
319
|
+
/**
|
|
320
|
+
* The IAM Role resource.
|
|
321
|
+
*/
|
|
322
|
+
role: import("@pulumi/aws/iam/role").Role;
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
//# sourceMappingURL=cron-v2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cron-v2.d.ts","sourceRoot":"","sources":["../../../../../../.sst/platform/src/components/aws/cron-v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,wBAAwB,EAAU,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAC,CAAC;IACvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,QAAQ,C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,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,wBAAwB;IAgN3E;;OAEG;IACH,IAAW,KAAK;QAGZ;;;WAGG;;QAQH;;WAEG;;QAQH;;WAEG;;QAEH;;WAEG;;MAGN;CACF"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ComponentResourceOptions, Output } from "@pulumi/pulumi";
|
|
2
2
|
import { Component, Transform } from "../component";
|
|
3
|
-
import { FunctionArgs, FunctionArn } from "./function";
|
|
3
|
+
import { Function, FunctionArgs, FunctionArn } from "./function.js";
|
|
4
4
|
import { Input } from "../input.js";
|
|
5
5
|
import { cloudwatch } from "@pulumi/aws";
|
|
6
6
|
import { Task } from "./task";
|
|
7
|
+
import { Workflow } from "./workflow.js";
|
|
7
8
|
export interface CronArgs {
|
|
8
9
|
/**
|
|
9
10
|
* The function that'll be executed when the cron job runs.
|
|
@@ -36,7 +37,7 @@ export interface CronArgs {
|
|
|
36
37
|
* }
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
job?: Input<string | FunctionArgs | FunctionArn>;
|
|
40
|
+
job?: Input<string | Workflow | Function | FunctionArgs | FunctionArn>;
|
|
40
41
|
/**
|
|
41
42
|
* The function that'll be executed when the cron job runs.
|
|
42
43
|
*
|
|
@@ -67,7 +68,7 @@ export interface CronArgs {
|
|
|
67
68
|
* }
|
|
68
69
|
* ```
|
|
69
70
|
*/
|
|
70
|
-
function?: Input<string | FunctionArgs | FunctionArn>;
|
|
71
|
+
function?: Input<string | Workflow | Function | FunctionArgs | FunctionArn>;
|
|
71
72
|
/**
|
|
72
73
|
* The task that'll be executed when the cron job runs.
|
|
73
74
|
*
|
|
@@ -119,7 +120,7 @@ export interface CronArgs {
|
|
|
119
120
|
* console.log(event.foo);
|
|
120
121
|
* ```
|
|
121
122
|
*/
|
|
122
|
-
event?: Input<
|
|
123
|
+
event?: Input<any>;
|
|
123
124
|
/**
|
|
124
125
|
* The schedule for the cron job.
|
|
125
126
|
*
|
|
@@ -177,9 +178,17 @@ export interface CronArgs {
|
|
|
177
178
|
};
|
|
178
179
|
}
|
|
179
180
|
/**
|
|
181
|
+
* The `Cron` component has been deprecated. Use [`CronV2`](https://sst.dev/docs/component/aws/cron-v2) instead.
|
|
182
|
+
*
|
|
183
|
+
* :::caution
|
|
184
|
+
* This component has been deprecated.
|
|
185
|
+
* :::
|
|
186
|
+
*
|
|
180
187
|
* The `Cron` component lets you add cron jobs to your app
|
|
181
188
|
* using [Amazon Event Bus](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus.html). The cron job can invoke a `Function` or a container `Task`.
|
|
182
189
|
*
|
|
190
|
+
* @deprecated Use [`CronV2`](https://sst.dev/docs/component/aws/cron-v2) instead.
|
|
191
|
+
*
|
|
183
192
|
* @example
|
|
184
193
|
* #### Cron job function
|
|
185
194
|
*
|
|
@@ -232,11 +241,11 @@ export declare class Cron extends Component {
|
|
|
232
241
|
* The AWS Lambda Function that'll be invoked when the cron job runs.
|
|
233
242
|
* @deprecated Use `nodes.function` instead.
|
|
234
243
|
*/
|
|
235
|
-
readonly job: Output<
|
|
244
|
+
readonly job: Output<Function>;
|
|
236
245
|
/**
|
|
237
246
|
* The AWS Lambda Function that'll be invoked when the cron job runs.
|
|
238
247
|
*/
|
|
239
|
-
readonly function: Output<
|
|
248
|
+
readonly function: Output<Function>;
|
|
240
249
|
/**
|
|
241
250
|
* The EventBridge Rule resource.
|
|
242
251
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../../../../.sst/platform/src/components/aws/cron.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,wBAAwB,EAAU,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAa,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"cron.d.ts","sourceR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