heroku 10.7.0-alpha.0 → 10.7.0-beta.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/lib/commands/addons/create.js +0 -9
- package/lib/commands/keys/add.js +1 -1
- package/lib/commands/pg/upgrade.js +59 -0
- package/lib/commands/spaces/create.js +0 -14
- package/lib/lib/ci/source.js +3 -2
- package/lib/lib/pg/types.d.ts +0 -15
- package/lib/lib/pg/util.d.ts +0 -1
- package/lib/lib/pg/util.js +1 -5
- package/oclif.manifest.json +1236 -1513
- package/package.json +4 -7
- package/lib/commands/pg/upgrade/cancel.d.ts +0 -13
- package/lib/commands/pg/upgrade/cancel.js +0 -53
- package/lib/commands/pg/upgrade/dryrun.d.ts +0 -14
- package/lib/commands/pg/upgrade/dryrun.js +0 -54
- package/lib/commands/pg/upgrade/index.js +0 -76
- package/lib/commands/pg/upgrade/prepare.d.ts +0 -14
- package/lib/commands/pg/upgrade/prepare.js +0 -54
- package/lib/commands/pg/upgrade/run.d.ts +0 -16
- package/lib/commands/pg/upgrade/run.js +0 -98
- package/lib/commands/pg/upgrade/wait.d.ts +0 -16
- package/lib/commands/pg/upgrade/wait.js +0 -103
- package/lib/hooks/plugins/preinstall/disclaimers.d.ts +0 -3
- package/lib/hooks/plugins/preinstall/disclaimers.js +0 -26
- /package/lib/commands/pg/{upgrade/index.d.ts → upgrade.d.ts} +0 -0
|
@@ -49,19 +49,10 @@ class Create extends command_1.Command {
|
|
|
49
49
|
const argv = restParse.argv
|
|
50
50
|
// oclif duplicates specified args in argv
|
|
51
51
|
.filter(arg => arg !== servicePlan);
|
|
52
|
-
const inferenceRegex = /^heroku-inference/;
|
|
53
|
-
const isInferenceAddon = inferenceRegex.test(servicePlan);
|
|
54
52
|
if (restParse.nonExistentFlags && restParse.nonExistentFlags.length > 0) {
|
|
55
53
|
process.stderr.write(` ${color_1.default.yellow('›')} For example: ${color_1.default.cyan(`heroku addons:create -a ${app} ${restParse.raw[0].input} -- ${restParse.nonExistentFlags.join(' ')}`)}`);
|
|
56
54
|
process.stderr.write(` ${color_1.default.yellow('›')} See https://devcenter.heroku.com/changelog-items/2925 for more info.\n`);
|
|
57
55
|
}
|
|
58
|
-
if (isInferenceAddon) {
|
|
59
|
-
core_1.ux.warn((0, tsheredoc_1.default) `
|
|
60
|
-
Heroku Managed Inference and Agent is a pilot or beta service that is subject to the Beta Services Terms at https://www.salesforce.com/company/legal/customer-agreements/ or a written Unified Pilot Agreement if executed by Customer, and the Non-GA Gen AI and Non-GA Credit Consumption terms in the Product Terms Directory at https://ptd.salesforce.com. While use of this pilot or beta service is itself free, such use may consume GA Heroku credits and/or resources for which the Customer may have paid or be charged. Use of this pilot or beta is at the Customer's sole discretion.
|
|
61
|
-
|
|
62
|
-
For clarity and without limitation, the various third-party machine learning and generative artificial intelligence (AI) models and applications (each a “Platform”) integrated with the Beta Service are Non-SFDC Applications, as that term is defined in the Beta Services Terms. Note that these third-party Platforms include features that use generative AI technology. Due to the nature of generative AI, the output that a Platform generates may be unpredictable, and may include inaccurate or harmful responses. Before using any generative AI output, Customer is solely responsible for reviewing the output for accuracy, safety, and compliance with applicable laws and third-party acceptable use policies. In addition, Customer’s use of each Platform may be subject to the Platform’s own terms and conditions, compliance with which Customer is solely responsible.
|
|
63
|
-
`);
|
|
64
|
-
}
|
|
65
56
|
const config = parseConfig(argv);
|
|
66
57
|
let addon;
|
|
67
58
|
try {
|
package/lib/commands/keys/add.js
CHANGED
|
@@ -51,7 +51,7 @@ class Add extends command_1.Command {
|
|
|
51
51
|
}
|
|
52
52
|
if (keys.length === 1) {
|
|
53
53
|
const key = keys[0];
|
|
54
|
-
core_1.ux.
|
|
54
|
+
core_1.ux.log(`Found an SSH public key at ${color_1.default.cyan(key)}`);
|
|
55
55
|
if (!flags.yes) {
|
|
56
56
|
const resp = await confirmPrompt('Would you like to upload it to Heroku?');
|
|
57
57
|
if (!resp.yes)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const color_1 = require("@heroku-cli/color");
|
|
4
|
+
const command_1 = require("@heroku-cli/command");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const tsheredoc_1 = require("tsheredoc");
|
|
7
|
+
const fetcher_1 = require("../../lib/pg/fetcher");
|
|
8
|
+
const host_1 = require("../../lib/pg/host");
|
|
9
|
+
const util_1 = require("../../lib/pg/util");
|
|
10
|
+
const confirmCommand_1 = require("../../lib/confirmCommand");
|
|
11
|
+
const nls_1 = require("../../nls");
|
|
12
|
+
class Upgrade extends command_1.Command {
|
|
13
|
+
async run() {
|
|
14
|
+
const { flags, args } = await this.parse(Upgrade);
|
|
15
|
+
const { app, version, confirm } = flags;
|
|
16
|
+
const { database } = args;
|
|
17
|
+
const db = await (0, fetcher_1.getAddon)(this.heroku, app, database);
|
|
18
|
+
if ((0, util_1.legacyEssentialPlan)(db))
|
|
19
|
+
core_1.ux.error('pg:upgrade is only available for Essential-* databases and follower databases on Standard-tier and higher plans.');
|
|
20
|
+
const { body: replica } = await this.heroku.get(`/client/v11/databases/${db.id}`, { hostname: (0, host_1.default)() });
|
|
21
|
+
if (replica.following) {
|
|
22
|
+
const { body: configVars } = await this.heroku.get(`/apps/${app}/config-vars`);
|
|
23
|
+
const origin = (0, util_1.databaseNameFromUrl)(replica.following, configVars);
|
|
24
|
+
await (0, confirmCommand_1.default)(app, confirm, (0, tsheredoc_1.default)(`
|
|
25
|
+
Destructive action
|
|
26
|
+
${color_1.default.addon(db.name)} will be upgraded to a newer PostgreSQL version, stop following ${origin}, and become writable.
|
|
27
|
+
|
|
28
|
+
This cannot be undone.
|
|
29
|
+
`));
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
await (0, confirmCommand_1.default)(app, confirm, (0, tsheredoc_1.default)(`
|
|
33
|
+
Destructive action
|
|
34
|
+
${color_1.default.addon(db.name)} will be upgraded to a newer PostgreSQL version.
|
|
35
|
+
|
|
36
|
+
This cannot be undone.
|
|
37
|
+
`));
|
|
38
|
+
}
|
|
39
|
+
const data = { version };
|
|
40
|
+
core_1.ux.action.start(`Starting upgrade of ${color_1.default.addon(db.name)}`);
|
|
41
|
+
await this.heroku.post(`/client/v11/databases/${db.id}/upgrade`, { hostname: (0, host_1.default)(), body: data });
|
|
42
|
+
core_1.ux.action.stop(`Use ${color_1.default.cmd('heroku pg:wait')} to track status`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = Upgrade;
|
|
46
|
+
Upgrade.topic = 'pg';
|
|
47
|
+
Upgrade.description = (0, tsheredoc_1.default)(`
|
|
48
|
+
For an Essential-* plan, this command upgrades the database's PostgreSQL version. For a Standard-tier and higher plan, this command unfollows the leader database before upgrading the PostgreSQL version.
|
|
49
|
+
To upgrade to another PostgreSQL version, use pg:copy instead
|
|
50
|
+
`);
|
|
51
|
+
Upgrade.flags = {
|
|
52
|
+
confirm: command_1.flags.string({ char: 'c' }),
|
|
53
|
+
version: command_1.flags.string({ char: 'v', description: 'PostgreSQL version to upgrade to' }),
|
|
54
|
+
app: command_1.flags.app({ required: true }),
|
|
55
|
+
remote: command_1.flags.remote(),
|
|
56
|
+
};
|
|
57
|
+
Upgrade.args = {
|
|
58
|
+
database: core_1.Args.string({ description: `${(0, nls_1.nls)('pg:database:arg:description')} ${(0, nls_1.nls)('pg:database:arg:description:default:suffix')}` }),
|
|
59
|
+
};
|
|
@@ -22,20 +22,6 @@ class Create extends command_1.Command {
|
|
|
22
22
|
const dollarAmountMonthly = shield ? '$3000' : '$1000';
|
|
23
23
|
const dollarAmountHourly = shield ? '$4.17' : '$1.39';
|
|
24
24
|
const spaceType = shield ? 'Shield' : 'Standard';
|
|
25
|
-
if (generation === 'fir') {
|
|
26
|
-
core_1.ux.warn((0, tsheredoc_1.default) `
|
|
27
|
-
Fir Pilot Features
|
|
28
|
-
Fir is currently a pilot service that is subject to the Beta Services Terms
|
|
29
|
-
(https://www.salesforce.com/company/legal/) or a written Unified Pilot Agreement
|
|
30
|
-
if executed by Customer, and applicable terms in the Product Terms Directory
|
|
31
|
-
(https://ptd.salesforce.com/?_ga=2.247987783.1372150065.1709219475-629000709.1639001992).
|
|
32
|
-
Use of this pilot or beta service is at the Customer's sole discretion.
|
|
33
|
-
|
|
34
|
-
Please note that we’re actively developing and adding new features, and not all
|
|
35
|
-
existing features are currently available. See the Dev Center
|
|
36
|
-
(https://devcenter.heroku.com/articles/generations) for more info.
|
|
37
|
-
`);
|
|
38
|
-
}
|
|
39
25
|
core_1.ux.action.start(`Creating space ${color_1.default.green(spaceName)} in team ${color_1.default.cyan(team)}`);
|
|
40
26
|
const { body: space } = await this.heroku.post('/spaces', {
|
|
41
27
|
headers: {
|
package/lib/lib/ci/source.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createSourceBlob = void 0;
|
|
4
4
|
const fs = require("async-file");
|
|
5
|
-
const core_1 = require("@oclif/core");
|
|
6
5
|
const git = require("./git");
|
|
7
6
|
const got_1 = require("got");
|
|
7
|
+
const debug_1 = require("debug");
|
|
8
|
+
const ciDebug = (0, debug_1.default)('ci');
|
|
8
9
|
async function uploadArchive(url, filePath) {
|
|
9
10
|
const request = got_1.default.stream.put(url, {
|
|
10
11
|
headers: {
|
|
@@ -34,7 +35,7 @@ async function createSourceBlob(ref, command) {
|
|
|
34
35
|
}
|
|
35
36
|
catch (error) {
|
|
36
37
|
// the commit isn't in the repo, we will package the local git commit instead
|
|
37
|
-
|
|
38
|
+
ciDebug('Commit not found in pipeline repository', error);
|
|
38
39
|
}
|
|
39
40
|
const sourceBlob = await prepareSource(ref, command);
|
|
40
41
|
return sourceBlob.source_blob.get_url;
|
package/lib/lib/pg/types.d.ts
CHANGED
|
@@ -94,12 +94,6 @@ export declare type PgStatus = {
|
|
|
94
94
|
'error?': boolean;
|
|
95
95
|
message: string;
|
|
96
96
|
};
|
|
97
|
-
export declare type PgUpgradeStatus = {
|
|
98
|
-
'waiting?': boolean;
|
|
99
|
-
'error?': boolean;
|
|
100
|
-
message: string;
|
|
101
|
-
step: string;
|
|
102
|
-
};
|
|
103
97
|
declare type TenantInfoNames = 'Plan' | 'Status' | 'Connections' | 'PG Version' | 'Created' | 'Data Size' | 'Tables' | 'Fork/Follow' | 'Rollback' | 'Continuous Protection' | 'Billing App' | 'Add-on';
|
|
104
98
|
export declare type TenantInfo = {
|
|
105
99
|
name: TenantInfoNames;
|
|
@@ -120,15 +114,6 @@ export declare type PgDatabaseTenant = {
|
|
|
120
114
|
info: Array<TenantInfo>;
|
|
121
115
|
};
|
|
122
116
|
export declare type PgDatabase = PgDatabaseService & PgDatabaseTenant;
|
|
123
|
-
export declare type PgUpgradeResponse = {
|
|
124
|
-
message: string;
|
|
125
|
-
};
|
|
126
|
-
export declare type PgUpgradeError = {
|
|
127
|
-
body: {
|
|
128
|
-
id: string;
|
|
129
|
-
message: string;
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
117
|
export declare type AddOnWithPlan = Required<Heroku.AddOnAttachment['addon']> & {
|
|
133
118
|
plan: Required<Heroku.AddOn['plan']>;
|
|
134
119
|
};
|
package/lib/lib/pg/util.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare function essentialPlan(addon: AddOnAttachmentWithConfigVarsAndPla
|
|
|
9
9
|
export declare function getConfigVarNameFromAttachment(attachment: Required<AddOnAttachment & {
|
|
10
10
|
addon: AddOnAttachmentWithConfigVarsAndPlan;
|
|
11
11
|
}>, config?: Record<string, string>): string;
|
|
12
|
-
export declare function formatResponseWithCommands(response: string): string;
|
|
13
12
|
export declare function presentCredentialAttachments(app: string, credAttachments: Required<AddOnAttachment>[], credentials: CredentialsInfo, cred: string): string;
|
|
14
13
|
export declare type ConnectionDetails = {
|
|
15
14
|
user: string;
|
package/lib/lib/pg/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parsePostgresConnectionString = exports.databaseNameFromUrl = exports.configVarNamesFromValue = exports.bastionKeyPlan = exports.getConnectionDetails = exports.presentCredentialAttachments = exports.
|
|
3
|
+
exports.parsePostgresConnectionString = exports.databaseNameFromUrl = exports.configVarNamesFromValue = exports.bastionKeyPlan = exports.getConnectionDetails = exports.presentCredentialAttachments = exports.getConfigVarNameFromAttachment = exports.essentialPlan = exports.legacyEssentialPlan = exports.essentialNumPlan = exports.getConfigVarName = void 0;
|
|
4
4
|
const color_1 = require("@heroku-cli/color");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const debug_1 = require("debug");
|
|
@@ -39,10 +39,6 @@ function getConfigVarNameFromAttachment(attachment, config = {}) {
|
|
|
39
39
|
return getConfigVarName(configVars);
|
|
40
40
|
}
|
|
41
41
|
exports.getConfigVarNameFromAttachment = getConfigVarNameFromAttachment;
|
|
42
|
-
function formatResponseWithCommands(response) {
|
|
43
|
-
return response.replace(/`(.*?)`/g, (_, word) => color_1.default.cmd(word));
|
|
44
|
-
}
|
|
45
|
-
exports.formatResponseWithCommands = formatResponseWithCommands;
|
|
46
42
|
function presentCredentialAttachments(app, credAttachments, credentials, cred) {
|
|
47
43
|
const isForeignApp = (attOrAddon) => attOrAddon.app.name === app ? 0 : 1;
|
|
48
44
|
const comparators = [
|