netlify-cli 24.11.2 → 25.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/commands/functions/functions-create.d.ts.map +1 -1
- package/dist/commands/functions/functions-create.js +1 -6
- package/dist/commands/functions/functions-create.js.map +1 -1
- package/dist/commands/logs/index.d.ts +0 -2
- package/dist/commands/logs/index.d.ts.map +1 -1
- package/dist/commands/logs/index.js +95 -29
- package/dist/commands/logs/index.js.map +1 -1
- package/dist/commands/logs/log-api.d.ts +64 -0
- package/dist/commands/logs/log-api.d.ts.map +1 -0
- package/dist/commands/logs/log-api.js +200 -0
- package/dist/commands/logs/log-api.js.map +1 -0
- package/dist/commands/logs/logs.d.ts +4 -0
- package/dist/commands/logs/logs.d.ts.map +1 -0
- package/dist/commands/logs/logs.js +302 -0
- package/dist/commands/logs/logs.js.map +1 -0
- package/dist/commands/logs/sources/deploy.d.ts +13 -0
- package/dist/commands/logs/sources/deploy.d.ts.map +1 -0
- package/dist/commands/logs/sources/deploy.js +71 -0
- package/dist/commands/logs/sources/deploy.js.map +1 -0
- package/dist/commands/logs/sources/edge-functions.d.ts +17 -0
- package/dist/commands/logs/sources/edge-functions.d.ts.map +1 -0
- package/dist/commands/logs/sources/edge-functions.js +71 -0
- package/dist/commands/logs/sources/edge-functions.js.map +1 -0
- package/dist/commands/logs/sources/functions.d.ts +22 -0
- package/dist/commands/logs/sources/functions.d.ts.map +1 -0
- package/dist/commands/logs/sources/functions.js +75 -0
- package/dist/commands/logs/sources/functions.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +72 -9
- package/scripts/netlifyPackage.js +2 -26
- package/dist/commands/logs/functions.d.ts +0 -4
- package/dist/commands/logs/functions.d.ts.map +0 -1
- package/dist/commands/logs/functions.js +0 -79
- package/dist/commands/logs/functions.js.map +0 -1
- package/functions-templates/go/hello-world/.netlify-function-template.mjs +0 -6
- package/functions-templates/go/hello-world/go.mod +0 -5
- package/functions-templates/go/hello-world/go.sum +0 -22
- package/functions-templates/go/hello-world/main.go +0 -24
- package/functions-templates/rust/hello-world/.netlify-function-template.mjs +0 -6
- package/functions-templates/rust/hello-world/Cargo.lock +0 -1149
- package/functions-templates/rust/hello-world/Cargo.toml +0 -14
- package/functions-templates/rust/hello-world/src/main.rs +0 -29
- package/npm-shrinkwrap.json +0 -13400
- package/scripts/prepublishOnly.js +0 -29
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as cp from 'node:child_process'
|
|
2
|
-
import * as fs from 'node:fs/promises'
|
|
3
|
-
import * as path from 'node:path'
|
|
4
|
-
|
|
5
|
-
const main = async () => {
|
|
6
|
-
// It's best practice to include a shrinkwrap when shipping a CLI. npm has a bug that makes it
|
|
7
|
-
// not ignore development dependencies in an installed package's shrinkwrap, though:
|
|
8
|
-
//
|
|
9
|
-
// https://github.com/npm/cli/issues/4323
|
|
10
|
-
//
|
|
11
|
-
// Leaving development dependencies makes the CLI installation significantly larger and increases
|
|
12
|
-
// the risk of platform-specific dependency installation issues.
|
|
13
|
-
// eslint-disable-next-line no-restricted-properties
|
|
14
|
-
const packageJSONPath = path.join(process.cwd(), 'package.json')
|
|
15
|
-
const rawPackageJSON = await fs.readFile(packageJSONPath, 'utf8')
|
|
16
|
-
|
|
17
|
-
// Remove dev dependencies from the package.json...
|
|
18
|
-
const packageJSON = JSON.parse(rawPackageJSON)
|
|
19
|
-
Reflect.deleteProperty(packageJSON, 'devDependencies')
|
|
20
|
-
await fs.writeFile(packageJSONPath, JSON.stringify(packageJSON, null, 2))
|
|
21
|
-
|
|
22
|
-
// Prune out dev dependencies (this updates the `package-lock.json` lockfile)
|
|
23
|
-
cp.spawnSync('npm', ['prune'], { stdio: 'inherit' })
|
|
24
|
-
|
|
25
|
-
// Convert `package-lock.json` lockfile to `npm-shrinkwrap.json`
|
|
26
|
-
cp.spawnSync('npm', ['shrinkwrap'], { stdio: 'inherit' })
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
await main()
|