@digitalocean/functions-deployer 5.0.22 → 5.0.23
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 +2 -2
- package/lib/credentials.d.ts +1 -0
- package/lib/deploy-struct.d.ts +1 -1
- package/lib/finder-builder.d.ts +2 -1
- package/lib/index.js +13 -4
- package/lib/index.js.map +2 -2
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,10 +16,10 @@ The `internalRelease.sh` script can also be run with a `--test` flag, in which c
|
|
|
16
16
|
|
|
17
17
|
### Testing changes locally
|
|
18
18
|
|
|
19
|
-
To test changes locally
|
|
19
|
+
To test changes locally. make sure to add --ignore-scripts flag during install.
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
npm install
|
|
22
|
+
npm install --ignore-scripts
|
|
23
23
|
npm run build
|
|
24
24
|
```
|
|
25
25
|
after which the deployer shell can be run as `/path/to/repo/bin/run`. It is often convenient to make a symbolic link in your path pointing to that location (e.g. as `dosls`). Then, you can test with
|
package/lib/credentials.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export declare function getApiHosts(persister: Persister): Promise<string[]>;
|
|
|
21
21
|
export declare function getCredentialList(): Promise<CredentialRow[]>;
|
|
22
22
|
export declare function getNamespace(host: string, auth: string): Promise<string>;
|
|
23
23
|
export declare function getCurrentNamespace(): Promise<string | undefined>;
|
|
24
|
+
export declare function omitAccountTokenFromRemoteSlice(credentials: Credentials | undefined): Credentials | undefined;
|
package/lib/deploy-struct.d.ts
CHANGED
package/lib/finder-builder.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { DeployStructure, PackageSpec, ProjectReader } from './deploy-struct';
|
|
1
|
+
import { DeployStructure, ActionSpec, PackageSpec, ProjectReader } from './deploy-struct';
|
|
2
2
|
export declare const BUILDER_NAMESPACE: string;
|
|
3
3
|
export declare function getBuildForAction(filepath: string, reader: ProjectReader): Promise<string>;
|
|
4
4
|
export declare function buildAllActions(spec: DeployStructure): Promise<PackageSpec[]>;
|
|
5
5
|
export declare function getBuildForLib(filepath: string, reader: ProjectReader): Promise<string>;
|
|
6
6
|
export declare function maybeBuildLib(spec: DeployStructure): Promise<void>;
|
|
7
7
|
export declare function checkIncludeItems(items: string[]): string;
|
|
8
|
+
export declare function makeConfigFromActionSpec(action: ActionSpec, spec: DeployStructure, pkgName: string): DeployStructure;
|
|
8
9
|
export declare function getRemoteBuildName(): string;
|
package/lib/index.js
CHANGED
|
@@ -348,6 +348,15 @@ function getUniqueCredentials(namespace, apihost, store) {
|
|
|
348
348
|
do_token: process.env.DO_API_KEY
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
+
function omitAccountTokenFromRemoteSlice(credentials) {
|
|
352
|
+
if (!credentials) {
|
|
353
|
+
return credentials;
|
|
354
|
+
}
|
|
355
|
+
return {
|
|
356
|
+
namespace: credentials.namespace,
|
|
357
|
+
ow: credentials.ow
|
|
358
|
+
};
|
|
359
|
+
}
|
|
351
360
|
|
|
352
361
|
// src/runtimes.ts
|
|
353
362
|
var import_axios = __toESM(require("axios"));
|
|
@@ -3105,7 +3114,7 @@ function makeConfigFromActionSpec(action, spec, pkgName) {
|
|
|
3105
3114
|
targetNamespace,
|
|
3106
3115
|
parameters,
|
|
3107
3116
|
environment: globalEnv,
|
|
3108
|
-
credentials,
|
|
3117
|
+
credentials: omitAccountTokenFromRemoteSlice(credentials),
|
|
3109
3118
|
flags,
|
|
3110
3119
|
deployerAnnotation,
|
|
3111
3120
|
buildEnv,
|
|
@@ -3566,7 +3575,7 @@ function npmBuilder(filepath, displayPath, flags, buildEnv, slice, feedback) {
|
|
|
3566
3575
|
debug7("Performing npm build for %s", filepath);
|
|
3567
3576
|
const cmd = flags.yarn ? "yarn" : "npm";
|
|
3568
3577
|
const npmRunBuild = buildScriptExists(filepath);
|
|
3569
|
-
const args = npmRunBuild ? ["install", "&&", cmd, "run", "build"] : ["install", "--production"];
|
|
3578
|
+
const args = npmRunBuild ? ["install", "--ignore-scripts", "&&", cmd, "run", "build"] : ["install", "--ignore-scripts", "--production"];
|
|
3570
3579
|
const infoMsg = [cmd, ...args].join(" ");
|
|
3571
3580
|
if (flags.incremental) {
|
|
3572
3581
|
debug7("Detected incremental build");
|
|
@@ -3593,7 +3602,7 @@ function npmBuilder(filepath, displayPath, flags, buildEnv, slice, feedback) {
|
|
|
3593
3602
|
filepath,
|
|
3594
3603
|
displayPath,
|
|
3595
3604
|
infoMsg,
|
|
3596
|
-
`${cmd} install`,
|
|
3605
|
+
`${cmd} install --ignore-scripts`,
|
|
3597
3606
|
flags.verboseBuild,
|
|
3598
3607
|
buildEnv,
|
|
3599
3608
|
slice,
|
|
@@ -4460,7 +4469,7 @@ var import_http = require("http");
|
|
|
4460
4469
|
var import_debug12 = __toESM(require("debug"));
|
|
4461
4470
|
|
|
4462
4471
|
// src/version.ts
|
|
4463
|
-
var version = "5.0.
|
|
4472
|
+
var version = "5.0.23";
|
|
4464
4473
|
|
|
4465
4474
|
// src/main.ts
|
|
4466
4475
|
var verboseError = (0, import_debug12.default)("nim:error");
|