Skip to content

Commit b1c0191

Browse files
Release shadow version 0.70.202603123
1 parent 61fdb7f commit b1c0191

690 files changed

Lines changed: 101202 additions & 3 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist/BsConfig.d.ts

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
import type { LogLevel } from './logging';
2+
export interface BsConfig {
3+
/**
4+
* The inheritance tree for all parent configs used to generate this config. Do not set this, it is computed.
5+
*/
6+
_ancestors?: string[];
7+
/**
8+
* A path to a project file. This is really only passed in from the command line, and should not be present in bsconfig.json files.
9+
* Prefix with a question mark (?) to prevent throwing an exception if the file does not exist.
10+
*/
11+
project?: string;
12+
manifest?: {
13+
bs_const?: Record<string, boolean | null>;
14+
};
15+
/**
16+
* when set, bsconfig.json loading is disabled
17+
*/
18+
noProject?: boolean;
19+
/**
20+
* Relative or absolute path to another bsconfig.json file that this file should import and then override.
21+
* Prefix with a question mark (?) to prevent throwing an exception if the file does not exist.
22+
*/
23+
extends?: string;
24+
/**
25+
* Override the current working directory.
26+
*/
27+
cwd?: string;
28+
/**
29+
* The root directory of your Roku project. Defaults to current directory.
30+
*/
31+
rootDir?: string;
32+
/**
33+
* The list of file globs used to find all files for the project
34+
* If using the {src;dest;} format, you can specify a different destination directory
35+
* for the matched files in src.
36+
*/
37+
files?: Array<string | {
38+
src: string | string[];
39+
dest?: string;
40+
}>;
41+
/**
42+
* The path where the output zip file should be placed.
43+
* @default "./out/package.zip"
44+
*/
45+
outFile?: string;
46+
/**
47+
* Creates a zip package. Defaults to true. This setting is ignored when deploy is enabled.
48+
*/
49+
createPackage?: boolean;
50+
/**
51+
* If true, the files are copied to staging. This setting is ignored when deploy is enabled or if createPackage is enabled
52+
*/
53+
copyToStaging?: boolean;
54+
/**
55+
* If true, the server will keep running and will watch and recompile on every file change
56+
* @default false
57+
*/
58+
watch?: boolean;
59+
/**
60+
* If true, after a successful buld, the project will be deployed to the roku specified in host
61+
*/
62+
deploy?: boolean;
63+
/**
64+
* The host of the Roku that this project will deploy to
65+
*/
66+
host?: string;
67+
/**
68+
* The username to use when deploying to a Roku device
69+
*/
70+
username?: string;
71+
/**
72+
* The password to use when deploying to a Roku device
73+
*/
74+
password?: string;
75+
/**
76+
* Prevent the staging folder from being deleted after creating the package
77+
* @default false
78+
*/
79+
retainStagingDir?: boolean;
80+
/**
81+
* Prevent the staging folder from being deleted after creating the package
82+
* @default false
83+
* @deprecated use `retainStagingDir` instead
84+
*/
85+
retainStagingFolder?: boolean;
86+
/**
87+
* The path to the staging directory (wehre the output files are copied immediately before creating the zip)
88+
*/
89+
stagingDir?: string;
90+
/**
91+
* The path to the staging folder (where all files are copied to right before creating the zip package)
92+
* @deprecated use `stagingDir` instead
93+
*/
94+
stagingFolderPath?: string;
95+
/**
96+
* A list of error codes the compiler should NOT emit, even if encountered.
97+
*/
98+
ignoreErrorCodes?: (number | string)[];
99+
/**
100+
* A map of error codes with their severity level override (error|warn|info)
101+
*/
102+
diagnosticSeverityOverrides?: Record<number | string, 'error' | 'warn' | 'info' | 'hint'>;
103+
/**
104+
* Emit full paths to files when printing diagnostics to the console. Defaults to false
105+
*/
106+
emitFullPaths?: boolean;
107+
/**
108+
* Emit type definition files (`d.bs`)
109+
* @default false
110+
*/
111+
emitDefinitions?: boolean;
112+
/**
113+
* If true, removes the explicit type to function's parameters and return (i.e. the `as type` syntax); otherwise keep this information.
114+
* @default false
115+
*/
116+
removeParameterTypes?: boolean;
117+
/**
118+
* A list of filters used to exclude diagnostics from the output
119+
*/
120+
diagnosticFilters?: Array<number | string | {
121+
src: string;
122+
codes: (number | string)[];
123+
} | {
124+
src: string;
125+
} | {
126+
codes: (number | string)[];
127+
}>;
128+
/**
129+
* Specify what diagnostic types should be printed to the console. Defaults to 'warn'
130+
*/
131+
diagnosticLevel?: 'info' | 'hint' | 'warn' | 'error';
132+
/**
133+
* A list of scripts or modules to add extra diagnostics or transform the AST
134+
*/
135+
plugins?: Array<string>;
136+
/**
137+
* A list of scripts or modules to pass to node's `require()` on startup. This is useful for doing things like ts-node registration
138+
*/
139+
require?: Array<string>;
140+
/**
141+
* When enabled, every xml component will search for a .bs or .brs file with the same name
142+
* in the same folder, and add it as a script import if found. Disabled by default"
143+
*/
144+
autoImportComponentScript?: boolean;
145+
/**
146+
* When enabled, diagnostics will be printed to the console.
147+
* When disabled, no diagnostics will be printed to the console.
148+
* @default true
149+
*/
150+
showDiagnosticsInConsole?: boolean;
151+
/**
152+
* The log level.
153+
* @default LogLevel.log
154+
*/
155+
logLevel?: LogLevel | 'error' | 'warn' | 'log' | 'info' | 'debug' | 'trace' | 'off';
156+
/**
157+
* Override the path to source files in source maps. Use this if you have a preprocess step and want
158+
* to ensure the source maps point to the original location.
159+
* This will only alter source maps for files within rootDir. Any files found outside of rootDir will not
160+
* have their source maps changed. This option also affects the `SOURCE_FILE_PATH` and `SOURCE_LOCATION` source literals.
161+
*/
162+
sourceRoot?: string;
163+
/**
164+
* Should the `sourceRoot` property be resolve to an absolute path (relative to the bsconfig it's defined in)
165+
* @default false
166+
*/
167+
resolveSourceRoot?: boolean;
168+
/**
169+
* Enables generating sourcemap files, which allow debugging tools to show the original source code while running the emitted files.
170+
* @default true
171+
*/
172+
sourceMap?: boolean;
173+
/**
174+
* Excludes empty files from being included in the output. Some Brighterscript files
175+
* are left empty or with only comments after transpilation to Brightscript.
176+
* The default behavior is to write these to disk after transpilation.
177+
* Setting this flag to `true` will prevent empty files being written and will
178+
* remove associated script tags from XML
179+
* @default false
180+
*/
181+
pruneEmptyCodeFiles?: boolean;
182+
/**
183+
* Allow brighterscript features (classes, interfaces, etc...) to be included in BrightScript (`.brs`) files, and force those files to be transpiled.
184+
* @default false
185+
*/
186+
allowBrighterScriptInBrightScript?: boolean;
187+
/**
188+
* Override the destination directory for the bslib.brs file. Use this if
189+
* you want to customize where the bslib.brs file is located in the staging
190+
* directory. Note that using a location outside of `source` will break
191+
* scripts inside `source` that depend on bslib.brs. Defaults to `source`.
192+
*/
193+
bslibDestinationDir?: string;
194+
}
195+
declare type OptionalBsConfigFields = '_ancestors' | 'sourceRoot' | 'project' | 'manifest' | 'noProject' | 'extends' | 'host' | 'password' | 'require' | 'stagingFolderPath' | 'diagnosticLevel' | 'rootDir' | 'stagingDir';
196+
export declare type FinalizedBsConfig = Omit<Required<BsConfig>, OptionalBsConfigFields> & Pick<BsConfig, OptionalBsConfigFields>;
197+
export {};

dist/BsConfig.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/BsConfig.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/BsConfig.spec.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

dist/BsConfig.spec.js

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/BsConfig.spec.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/BusyStatusTracker.d.ts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import { Deferred } from './deferred';
2+
interface RunInfo<T> {
3+
label: string;
4+
startTime: Date;
5+
scope?: T;
6+
deferred?: Deferred;
7+
}
8+
/**
9+
* Tracks the busy/idle status of various sync or async tasks
10+
* Reports the overall status to the client
11+
*/
12+
export declare class BusyStatusTracker<T = any> {
13+
/**
14+
* @readonly
15+
*/
16+
activeRuns: Array<RunInfo<T>>;
17+
/**
18+
* Begin a busy task. It's expected you will call `endScopeRun` when the task is complete.
19+
* @param scope an object used for reference as to what is doing the work. Can be used to bulk-cancel all runs for a given scope.
20+
* @param label label for the run. This is required for the `endScopedRun` method to know what to end.
21+
*/
22+
beginScopedRun(scope: T, label: string): void;
23+
/**
24+
* End the earliest run for the given scope and label
25+
* @param scope an object used for reference as to what is doing the work. Can be used to bulk-cancel all runs for a given scope.
26+
* @param label label for the run
27+
*/
28+
endScopedRun(scope: T, label: string): Promise<void>;
29+
/**
30+
* End all runs for a given scope. This is typically used when the scope is destroyed, and we want to make sure all runs are cleaned up.
31+
* @param scope an object used for reference as to what is doing the work.
32+
*/
33+
endAllRunsForScope(scope: T): void;
34+
/**
35+
* Start a new piece of work
36+
*/
37+
run<A, R = A | Promise<A>>(callback: (finalize?: FinalizeBuildStatusRun) => R, label?: string): R;
38+
private _run;
39+
private emitter;
40+
once(eventName: 'active-runs-change'): Promise<{
41+
activeRuns: Array<RunInfo<T>>;
42+
}>;
43+
once(eventName: 'change'): Promise<BusyStatus>;
44+
on(eventName: 'active-runs-change', handler: (event: {
45+
activeRuns: Array<RunInfo<T>>;
46+
}) => void): any;
47+
on(eventName: 'change', handler: (status: BusyStatus) => void): any;
48+
private emit;
49+
destroy(): void;
50+
/**
51+
* The current status of the busy tracker.
52+
* @readonly
53+
*/
54+
get status(): BusyStatus;
55+
}
56+
export declare type FinalizeBuildStatusRun = (status?: BusyStatus) => void;
57+
export declare enum BusyStatus {
58+
busy = "busy",
59+
idle = "idle"
60+
}
61+
export {};

0 commit comments

Comments
 (0)