@mark1russell7/stack-spend 0.1.5 → 0.1.8
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/README.md +57 -4
- package/build/add-on.d.ts +2 -2
- package/build/add-on.js +1 -1
- package/build/{check-CpHvgGvh.d.ts → check-Dh9mPQSu.d.ts} +4 -3
- package/build/check-Dh9mPQSu.d.ts.map +1 -0
- package/build/gcp-stop.d.ts +151 -0
- package/build/gcp-stop.d.ts.map +1 -0
- package/build/gcp-stop.js +357 -0
- package/build/gcp-stop.js.map +1 -0
- package/build/index.d.ts +6 -3
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -3
- package/build/index.js.map +1 -1
- package/build/{join-BsjQ9eKd.js → join-98opeDSl.js} +12 -4
- package/build/join-98opeDSl.js.map +1 -0
- package/build/{layer-BYSJfC_1.d.ts → layer-Dm7OM6CQ.d.ts} +14 -2
- package/build/layer-Dm7OM6CQ.d.ts.map +1 -0
- package/build/reads-BNyUIVaY.js.map +1 -1
- package/build/schema.d.ts +1 -1
- package/build/schema.d.ts.map +1 -1
- package/build/schema.js +6 -1
- package/build/schema.js.map +1 -1
- package/package.json +7 -2
- package/build/check-CpHvgGvh.d.ts.map +0 -1
- package/build/join-BsjQ9eKd.js.map +0 -1
- package/build/layer-BYSJfC_1.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ An alert stops nothing, so an alert is not a limit. A balance that gets money au
|
|
|
26
26
|
| `@mark1russell7/stack-spend` | The records of a layer, the cost formulas, the states, the gate, the steps of the owner, the used amounts and a sample. |
|
|
27
27
|
| `@mark1russell7/stack-spend/schema` | `spendSchema` and `parseSpend` for a layer, and `readsSchema` and `parseReads` for a list of reads. |
|
|
28
28
|
| `@mark1russell7/stack-spend/add-on` | `spendAddOn`, the add-on in the form of the layer contract of the core. |
|
|
29
|
+
| `@mark1russell7/stack-spend/gcp-stop` | A stop for a project of Google Cloud: the function that removes the billing account at the amount, and the script that makes it. |
|
|
29
30
|
|
|
30
31
|
The root entry has no schema library. Thus a page that only shows the cost of a month gets no zod.
|
|
31
32
|
|
|
@@ -134,7 +135,7 @@ checkSpend(SAMPLE_SPEND, SAMPLE_STACK, { today: SAMPLE_TODAY }).map((fault) => `
|
|
|
134
135
|
| `limit-recharge` | error | A prepaid balance gets money automatically. |
|
|
135
136
|
| `limit-stop` | error | A stop by code does not name the part of the stack that stops the use. |
|
|
136
137
|
| `limit-wanted` | error | A wanted limit is not in force. |
|
|
137
|
-
| `end-date` | error | The date of the end of a plan is not a date. |
|
|
138
|
+
| `end-date` | error | The date of the end of a plan is not a date. The date of its decision is not a date, or it is after `today`. |
|
|
138
139
|
| `end-past` | error | The plan ended before the date of the check. The record gives the cost before the end. |
|
|
139
140
|
| `end-soon` | warning | The plan ends in `endDays` days, or fewer. |
|
|
140
141
|
| `end-open` | error | The cost after the end of a plan grows with the use, and it has no hard limit. |
|
|
@@ -152,10 +153,12 @@ A trial, a free credit or a term ends on a date. The field `ends` of a cost reco
|
|
|
152
153
|
| --- | --- |
|
|
153
154
|
| `date` | The last day of the plan, as `YYYY-MM-DD`. |
|
|
154
155
|
| `next` | The cost after the end: its `plan`, its `billing`, its `price` and its `limits`. A service that stops has none. |
|
|
156
|
+
| `decided` | The decision of the owner that the result after the end is wanted: its `date` and the person in `by`. |
|
|
155
157
|
|
|
156
158
|
- With no `next`, the provider stops the service after the date, and it takes no money. The part does not work after the date.
|
|
157
159
|
- With a `next`, the service continues after the date, with the cost of `next`.
|
|
158
160
|
- The rule holds for the cost of `next` too: a `metered` cost must have a hard limit.
|
|
161
|
+
- With a `decided`, the end gives no step to the owner. A cost after the end with no hard limit stays a fault.
|
|
159
162
|
|
|
160
163
|
`SAMPLE_ENDS` of the package is a layer for `SAMPLE_STACK` with two plans that end:
|
|
161
164
|
|
|
@@ -197,6 +200,15 @@ The free credit of the call account ends with no plan after it. The provider tak
|
|
|
197
200
|
- The warning starts `endDays` days before the last day of the plan. The default is `END_DAYS`, 30 days.
|
|
198
201
|
- After the last day, the fault is `end-past`: the record gives the old plan. The owner reads the account again.
|
|
199
202
|
- A plan that ends later than the days of warning gives no fault. The fault `end-open` does not wait for the days of warning.
|
|
203
|
+
- The warning tells the decision of the owner, when the record has one. The fault `end-date` finds a decision with a date that is not valid.
|
|
204
|
+
|
|
205
|
+
The owner of the call account decides that the stop is wanted. The record keeps the decision:
|
|
206
|
+
|
|
207
|
+
```ts
|
|
208
|
+
const decided = { part: "call-account", plan: "A free credit", billing: "free", ends: { date: "2026-11-30", decided: { date: "2026-11-12", by: "The owner" } }, proof };
|
|
209
|
+
// The warning: 'The plan of "call-account" ends on 2026-11-30, in 14 days. Then the provider stops the service. The owner decided this on 2026-11-12.'
|
|
210
|
+
// `ownerSteps` gives no step for this end, and `planEnds` gives `decided: true` for it.
|
|
211
|
+
```
|
|
200
212
|
- The faults `price`, `amount` and `limit-stop` examine the cost of `next` too.
|
|
201
213
|
|
|
202
214
|
### The parts that stop
|
|
@@ -209,8 +221,8 @@ import { SAMPLE_STACK } from "@mark1russell7/system-stack";
|
|
|
209
221
|
|
|
210
222
|
planEnds(SAMPLE_ENDS, { today: SAMPLE_TODAY });
|
|
211
223
|
// => [
|
|
212
|
-
// { part: "call-account", date: "2026-11-30", days: 14, stops: true },
|
|
213
|
-
// { part: "cloud-account", date: "2026-12-01", days: 15, stops: false },
|
|
224
|
+
// { part: "call-account", date: "2026-11-30", days: 14, stops: true, decided: false },
|
|
225
|
+
// { part: "cloud-account", date: "2026-12-01", days: 15, stops: false, decided: false },
|
|
214
226
|
// ]
|
|
215
227
|
|
|
216
228
|
endStops(SAMPLE_ENDS, SAMPLE_STACK, { today: SAMPLE_TODAY });
|
|
@@ -274,7 +286,7 @@ ownerSteps(SAMPLE_SPEND, SAMPLE_STACK, { today: SAMPLE_TODAY });
|
|
|
274
286
|
| --- | --- |
|
|
275
287
|
| `limit-wanted` | Set the wanted limit in the account. A wanted stop by code is the work of a programmer, so it gives no step. |
|
|
276
288
|
| `limit-recharge` | Stop the automatic recharge of the balance. |
|
|
277
|
-
| `end-soon` | Decide before the date. A service with no plan after the end stops, and the cost of each other service changes. |
|
|
289
|
+
| `end-soon` | Decide before the date. A service with no plan after the end stops, and the cost of each other service changes. An end with a `decided` gives no step. |
|
|
278
290
|
| `end-open` | Set a hard limit for the cost after the end, or stop the service before the date. Then `end-soon` gives no second step. |
|
|
279
291
|
| `end-past`, `proof-none`, `proof-old` | Read the plan and the limits in the account, and give them with the date of the read. |
|
|
280
292
|
|
|
@@ -400,6 +412,47 @@ The reads become a second tree: the layer, then each service, then each read. `u
|
|
|
400
412
|
`MONTH_READS` is the axis of the reads of a service in the month of the check.
|
|
401
413
|
A share reaches a level when it is the level less `LEVEL_TOLERANCE`, or more. Thus the rounding of a division does not hide a level.
|
|
402
414
|
|
|
415
|
+
## A stop for a project of Google Cloud
|
|
416
|
+
|
|
417
|
+
Google Cloud has no hard limit of the cost of a project. A budget sends alerts, and an alert stops nothing. The entry `/gcp-stop` makes a limit of the kind `code` for a project:
|
|
418
|
+
|
|
419
|
+
1. A budget of the project sends a notification to a Pub/Sub topic some times each day.
|
|
420
|
+
2. A function reads each notification. `stopBilling(data, fetch)` is the function.
|
|
421
|
+
3. When the cost of the month is at the amount of the budget, the function removes the billing account of the project. Then Google stops the paid services of the project.
|
|
422
|
+
|
|
423
|
+
`stopScript(options)` gives a Bash script for Cloud Shell. The script makes the budget, the topic, the identity of the function and the function. Then it tests the function with a cost of 0. The owner of the project starts the script one time.
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
import { stopScript } from "@mark1russell7/stack-spend/gcp-stop";
|
|
427
|
+
|
|
428
|
+
const script = stopScript({ project: "sample-project-1", amount: 5, currency: "USD", version: "^0.1.8" });
|
|
429
|
+
// A text that starts with "#!/usr/bin/env bash". Save it as a file, and run it in Cloud Shell.
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
The record of the limit names the function as its `stop`:
|
|
433
|
+
|
|
434
|
+
```ts
|
|
435
|
+
{ kind: "code", amount: 5, stop: "cloud-stop" }
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
The rules of the stop:
|
|
439
|
+
|
|
440
|
+
- The identity of the function has the role Project Billing Manager on the project only. It holds no role on the billing account.
|
|
441
|
+
- The source of the function is two files with no key. The function gets its token from the metadata server of Google Cloud.
|
|
442
|
+
- Below the amount, the function examines that its identity holds the permission of the stop. The log tells `"ready": true`, so each notification is a proof that the stop works.
|
|
443
|
+
- At the amount, the function reads the billing state of the project. When the project has no billing account, it does nothing more.
|
|
444
|
+
- The stop does not depend on that read. When the read fails, the function removes the billing account all the same.
|
|
445
|
+
- A request that fails gives the result `failed` and an error in the log. The next notification tries again.
|
|
446
|
+
- The result of the function holds no token.
|
|
447
|
+
|
|
448
|
+
The limits of the stop:
|
|
449
|
+
|
|
450
|
+
- The cost data of Google comes some hours late. Thus the cost can go a little above the amount before the stop.
|
|
451
|
+
- A project with no billing account stops each paid service, also a server in the free tier. Google can delete the resources of the project after a time.
|
|
452
|
+
- To undo a stop, raise the amount of the budget, link the billing account again, and start each server again. The script tells the commands.
|
|
453
|
+
|
|
454
|
+
The entry has no dependencies. The functions that make each request (`tokenRequest`, `projectRequest`, `billingInfoRequest`, `detachRequest` and `permissionRequest`) give the request as data. `readNotification` reads a notification, and `decideStop` gives the decision.
|
|
455
|
+
|
|
403
456
|
## The read of JSON
|
|
404
457
|
|
|
405
458
|
`parseSpend` of the entry `/schema` reads the JSON of a layer. It gives the layer, or the faults of its form with the place of each fault.
|
package/build/add-on.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as SpendOptions } from "./check-
|
|
2
|
-
import {
|
|
1
|
+
import { i as SpendOptions } from "./check-Dh9mPQSu.js";
|
|
2
|
+
import { p as SpendLayer } from "./layer-Dm7OM6CQ.js";
|
|
3
3
|
import { StackJoiner } from "@mark1russell7/system-stack";
|
|
4
4
|
/**
|
|
5
5
|
* This function gives the spend add-on for a check on one date.
|
package/build/add-on.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as checkSpend, t as joinSpend } from "./join-
|
|
1
|
+
import { r as checkSpend, t as joinSpend } from "./join-98opeDSl.js";
|
|
2
2
|
import { o as SPEND_SCHEMA } from "./reads-BNyUIVaY.js";
|
|
3
3
|
import { parseSpend } from "./schema.js";
|
|
4
4
|
import { dayNumber } from "@mark1russell7/system-stack";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as SpendLayer } from "./layer-Dm7OM6CQ.js";
|
|
2
2
|
import { Fault, Stack, dayNumber } from "@mark1russell7/system-stack";
|
|
3
3
|
/** These are the codes of the faults of a spend layer. */
|
|
4
4
|
declare const SPEND_CODES: readonly ["service-part", "service-duplicate", "part-no-service", "price", "amount", "limit-none", "limit-alert", "limit-recharge", "limit-stop", "limit-wanted", "end-date", "end-past", "end-soon", "end-open", "proof-none", "proof-date", "proof-old"];
|
|
@@ -31,9 +31,10 @@ interface SpendOptions {
|
|
|
31
31
|
* - `limit-wanted`: a wanted limit is not in force.
|
|
32
32
|
*
|
|
33
33
|
* The end of a plan:
|
|
34
|
-
* - `end-date`: the date of an end is not a date.
|
|
34
|
+
* - `end-date`: the date of an end is not a date. The date of its decision is not a date, or it is after `today`.
|
|
35
35
|
* - `end-past`: the plan ended before `today`. The record gives the cost before the end, so it is not correct.
|
|
36
36
|
* - `end-soon`: the plan ends in `endDays` days, or fewer. This fault is a warning: it does not stop the gate.
|
|
37
|
+
* Its message tells the decision of the owner, when the record has one.
|
|
37
38
|
* - `end-open`: the cost after the end grows with the use, and it has no hard limit.
|
|
38
39
|
*
|
|
39
40
|
* The proofs:
|
|
@@ -48,4 +49,4 @@ interface SpendOptions {
|
|
|
48
49
|
*/
|
|
49
50
|
declare function checkSpend(layer: SpendLayer, stack: Stack, options: SpendOptions): SpendFault[];
|
|
50
51
|
export { checkSpend as a, SpendOptions as i, SpendCode as n, dayNumber as o, SpendFault as r, SPEND_CODES as t };
|
|
51
|
-
//# sourceMappingURL=check-
|
|
52
|
+
//# sourceMappingURL=check-Dh9mPQSu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-Dh9mPQSu.d.ts","names":[],"sources":["../src/check.ts"],"mappings":";;;cAOa;;KAuCD,oBAAoB;;UAGf,mBAAmB;WACzB,MAAM;;;UAIA;;WAEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmDK,WAAW,OAAO,YAAY,OAAO,OAAO,SAAS,eAAe"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The entry `@mark1russell7/stack-spend/gcp-stop`: a stop by code for a project of Google Cloud.
|
|
3
|
+
*
|
|
4
|
+
* A budget of the project sends a notification to a Pub/Sub topic some times each day. A function reads each notification.
|
|
5
|
+
* When the cost of the month is at the amount of the budget, the function removes the billing account of the project.
|
|
6
|
+
* Then Google stops the paid services of the project. This is the limit of the kind `code`, with the function as its `stop`.
|
|
7
|
+
*
|
|
8
|
+
* The entry has no dependencies and no clock. The caller gives the `fetch`, so a test gives a fake.
|
|
9
|
+
*/
|
|
10
|
+
/** The fields of a budget notification that the stop uses. */
|
|
11
|
+
export interface BudgetNotification {
|
|
12
|
+
/** The name of the budget. */
|
|
13
|
+
readonly budgetDisplayName: string;
|
|
14
|
+
/** The cost of the period of the budget, up to the time of the notification. */
|
|
15
|
+
readonly costAmount: number;
|
|
16
|
+
/** The amount of the budget. */
|
|
17
|
+
readonly budgetAmount: number;
|
|
18
|
+
/** The currency of the two amounts, for example `USD`. */
|
|
19
|
+
readonly currencyCode: string;
|
|
20
|
+
/** The start of the period of the budget, as an ISO 8601 time. */
|
|
21
|
+
readonly costIntervalStart: string;
|
|
22
|
+
}
|
|
23
|
+
/** The result of a read of a notification: the notification, or the reason that the read failed. */
|
|
24
|
+
export type NotificationRead = {
|
|
25
|
+
readonly ok: true;
|
|
26
|
+
readonly notification: BudgetNotification;
|
|
27
|
+
} | {
|
|
28
|
+
readonly ok: false;
|
|
29
|
+
readonly error: string;
|
|
30
|
+
};
|
|
31
|
+
/** The decision of the stop for one notification. */
|
|
32
|
+
export interface StopDecision {
|
|
33
|
+
/** `true` when the cost is at the amount of the budget or above it. */
|
|
34
|
+
readonly stop: boolean;
|
|
35
|
+
/** The decision in words, with the two amounts. */
|
|
36
|
+
readonly reason: string;
|
|
37
|
+
}
|
|
38
|
+
/** One request of the stop, as data. The headers can hold a token, so do not write a request to a log. */
|
|
39
|
+
export interface StopRequest {
|
|
40
|
+
readonly method: "GET" | "POST" | "PUT";
|
|
41
|
+
readonly url: string;
|
|
42
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
43
|
+
readonly body?: string;
|
|
44
|
+
}
|
|
45
|
+
/** The answer of a request, with only the parts that the stop reads. The global `fetch` gives this form. */
|
|
46
|
+
export interface StopAnswer {
|
|
47
|
+
readonly status: number;
|
|
48
|
+
text(): Promise<string>;
|
|
49
|
+
}
|
|
50
|
+
/** The function that sends a request. The global `fetch` is such a function. */
|
|
51
|
+
export type StopFetch = (url: string, init: {
|
|
52
|
+
method: string;
|
|
53
|
+
headers: Record<string, string>;
|
|
54
|
+
body?: string;
|
|
55
|
+
}) => Promise<StopAnswer>;
|
|
56
|
+
/**
|
|
57
|
+
* The result of the stop for one notification. It holds no token.
|
|
58
|
+
*
|
|
59
|
+
* - `refused`: the notification has a fault of form, so the stop does nothing.
|
|
60
|
+
* - `kept`: the cost is below the amount. `ready` tells if the identity of the function can remove the billing account.
|
|
61
|
+
* - `stopped`: the stop removed the billing account of the project.
|
|
62
|
+
* - `already`: the project had no billing account.
|
|
63
|
+
* - `failed`: a request failed. The next notification tries again.
|
|
64
|
+
*/
|
|
65
|
+
export type StopOutcome = {
|
|
66
|
+
readonly action: "refused";
|
|
67
|
+
readonly reason: string;
|
|
68
|
+
} | {
|
|
69
|
+
readonly action: "kept";
|
|
70
|
+
readonly reason: string;
|
|
71
|
+
readonly project: string;
|
|
72
|
+
readonly ready: boolean;
|
|
73
|
+
} | {
|
|
74
|
+
readonly action: "stopped" | "already";
|
|
75
|
+
readonly reason: string;
|
|
76
|
+
readonly project: string;
|
|
77
|
+
} | {
|
|
78
|
+
readonly action: "failed";
|
|
79
|
+
readonly reason: string;
|
|
80
|
+
};
|
|
81
|
+
/** The root of the metadata server of Google Cloud. A function gets its token and its project from it. */
|
|
82
|
+
export declare const METADATA_URL = "http://metadata.google.internal/computeMetadata/v1";
|
|
83
|
+
/** The root of the Cloud Billing API. */
|
|
84
|
+
export declare const BILLING_URL = "https://cloudbilling.googleapis.com/v1";
|
|
85
|
+
/** The root of the Cloud Resource Manager API. */
|
|
86
|
+
export declare const RESOURCE_MANAGER_URL = "https://cloudresourcemanager.googleapis.com/v1";
|
|
87
|
+
/** The permission that lets the identity of the function remove the billing account of the project. */
|
|
88
|
+
export declare const STOP_PERMISSION = "resourcemanager.projects.deleteBillingAssignment";
|
|
89
|
+
/** This function tells if a text is a project id of Google Cloud. A request puts the id in its path, so the stop examines it. */
|
|
90
|
+
export declare function isProjectId(value: string): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* This function reads a budget notification from the data of a CloudEvent of Pub/Sub. The data has the form
|
|
93
|
+
* `{ message: { data } }`, and `data` is the notification as base64 JSON.
|
|
94
|
+
*/
|
|
95
|
+
export declare function readNotification(data: unknown): NotificationRead;
|
|
96
|
+
/** This function decides the stop: the stop acts when the cost is at the amount of the budget or above it. */
|
|
97
|
+
export declare function decideStop(notification: BudgetNotification): StopDecision;
|
|
98
|
+
/** This function gives the request of the token of the identity of the function, to the metadata server. */
|
|
99
|
+
export declare function tokenRequest(): StopRequest;
|
|
100
|
+
/** This function gives the request of the id of the project of the function, to the metadata server. */
|
|
101
|
+
export declare function projectRequest(): StopRequest;
|
|
102
|
+
/** This function gives the request that reads the billing state of a project. */
|
|
103
|
+
export declare function billingInfoRequest(project: string, token: string): StopRequest;
|
|
104
|
+
/** This function gives the request that removes the billing account of a project: a billing account name that is empty. */
|
|
105
|
+
export declare function detachRequest(project: string, token: string): StopRequest;
|
|
106
|
+
/** This function gives the request that tells if the identity of the function holds the permission of the stop. */
|
|
107
|
+
export declare function permissionRequest(project: string, token: string): StopRequest;
|
|
108
|
+
/**
|
|
109
|
+
* This function is the stop. It reads the notification, and it decides. Below the amount, it examines that the identity of
|
|
110
|
+
* the function holds the permission of the stop. At the amount, it removes the billing account of the project, if the
|
|
111
|
+
* project has one.
|
|
112
|
+
*
|
|
113
|
+
* @param data - The data of the CloudEvent of Pub/Sub
|
|
114
|
+
* @param fetch - The function that sends a request, for example the global `fetch`
|
|
115
|
+
*/
|
|
116
|
+
export declare function stopBilling(data: unknown, fetch: StopFetch): Promise<StopOutcome>;
|
|
117
|
+
/** The options of the script that makes the stop of a project. */
|
|
118
|
+
export interface StopScriptOptions {
|
|
119
|
+
/** The id of the project. */
|
|
120
|
+
readonly project: string;
|
|
121
|
+
/** The amount of the budget for each month. */
|
|
122
|
+
readonly amount: number;
|
|
123
|
+
/** The currency of the billing account, for example `USD`. */
|
|
124
|
+
readonly currency: string;
|
|
125
|
+
/** The version range of this package in the source of the function, for example `^0.1.8`. */
|
|
126
|
+
readonly version: string;
|
|
127
|
+
/** The region of the function. The default is `us-central1`. */
|
|
128
|
+
readonly region?: string;
|
|
129
|
+
/** The name of the topic, of the function and of its identity. The default is `billing-stop`. */
|
|
130
|
+
readonly name?: string;
|
|
131
|
+
}
|
|
132
|
+
/** The version range of the Functions Framework in the source of the function. */
|
|
133
|
+
export declare const FRAMEWORK_RANGE = "^5.0.5";
|
|
134
|
+
/** The runtime of the function. */
|
|
135
|
+
export declare const STOP_RUNTIME = "nodejs22";
|
|
136
|
+
/** The name of the entry point of the function. */
|
|
137
|
+
export declare const STOP_ENTRY_POINT = "billingStop";
|
|
138
|
+
/** This function gives the source of the function: its `package.json` and its `index.js`. */
|
|
139
|
+
export declare function stopSource(version: string): {
|
|
140
|
+
readonly packageJson: string;
|
|
141
|
+
readonly indexJs: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* This function gives a Bash script for Cloud Shell. The script makes the stop of a project: a budget for each month, a
|
|
145
|
+
* Pub/Sub topic, the identity of the function, and the function. Then it tests the function with a cost of 0.
|
|
146
|
+
*
|
|
147
|
+
* The script has no key and makes no key. It reads the billing account of the project when it starts, so the text does not
|
|
148
|
+
* hold the account id. A second run changes nothing that is already made.
|
|
149
|
+
*/
|
|
150
|
+
export declare function stopScript(options: StopScriptOptions): string;
|
|
151
|
+
//# sourceMappingURL=gcp-stop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gcp-stop.d.ts","names":[],"sources":["../src/gcp-stop.ts"],"mappings":";;;;;;;;;;iBAWiB;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;;YAIC;WAA8B;WAAmB,cAAc;;WAAkC;WAAoB;;;iBAGhH;;WAEN;;WAEA;;;iBAIM;WACN;WACA;WACA,SAAS,SAAS;WAClB;;;iBAIM;WACN;EACT,QAAQ;;;YAIE,aAAa,aAAa;EAAQ;EAAgB,SAAS;EAAwB;MAAoB,QAAQ;;;;;;;;;;YAW/G;WACG;WAA4B;;WAC5B;WAAyB;WAAyB;WAA0B;;WAC5E;WAAwC;WAAyB;;WACjE;WAA2B;;;qBAG7B;;qBAGA;;qBAGA;;qBAGA;;wBAMG,YAAY;;;;;wBA0BZ,iBAAiB,gBAAgB;;wBA6BjC,WAAW,cAAc,qBAAqB;;wBAS9C,gBAAgB;;wBAKhB,kBAAkB;;wBAUlB,mBAAmB,iBAAiB,gBAAgB;;wBAKpD,cAAc,iBAAiB,gBAAgB;;wBAU/C,kBAAkB,iBAAiB,gBAAgB;;;;;;;;;wBA2C7C,YAAY,eAAe,OAAO,YAAY,QAAQ;;iBAiC3D;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;qBAIE;;qBAGA;;qBAGA;;wBAGG,WAAW;WAA6B;WAA8B;;;;;;;;;wBAmCtE,WAAW,SAAS"}
|