Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
GordonSmith committed Aug 18, 2024
1 parent d184117 commit 820c456
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ecl-sample/notebooks/test.eclnb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"mode": "js",
"shared": true,
"outputs": [
"eCA9IDE7DQp6ID0gMjsNCnggKyB6Ow=="
"eCA9IDE7DQp6ID0gMjsNCnggKyB6ICogNjs="
]
},
{
Expand Down Expand Up @@ -37,7 +37,7 @@
"mode": "ecl",
"shared": true,
"outputs": [
"UGFyZW50RXh0cmFjdGVkID0gW3sibmFtZWlkIjoxLCJuYW1lIjoiR2F2aW4gICAgICAgICAgICAgICAifSx7Im5hbWVpZCI6MiwibmFtZSI6IkxpeiAgICAgICAgICAgICAgICAgIn0seyJuYW1laWQiOjMsIm5hbWUiOiJNciBOb2JvZHkgICAgICAgICAgICJ9LHsibmFtZWlkIjo0LCJuYW1lIjoiQW55d2hlcmUgICAgICAgICAgICAifV07UGFyZW50RGF0YVJlYWR5ID0gW3sibmFtZWlkIjoxLCJuYW1lIjoiR2F2aW4gICAgICAgICAgICAgICAiLCJudW1yb3dzIjowLCJjaGlsZHJlbiI6eyJSb3ciOltdfX0seyJuYW1laWQiOjIsIm5hbWUiOiJMaXogICAgICAgICAgICAgICAgICIsIm51bXJvd3MiOjAsImNoaWxkcmVuIjp7IlJvdyI6W119fSx7Im5hbWVpZCI6MywibmFtZSI6Ik1yIE5vYm9keSAgICAgICAgICAgIiwibnVtcm93cyI6MCwiY2hpbGRyZW4iOnsiUm93IjpbXX19LHsibmFtZWlkIjo0LCJuYW1lIjoiQW55d2hlcmUgICAgICAgICAgICAiLCJudW1yb3dzIjowLCJjaGlsZHJlbiI6eyJSb3ciOltdfX1dO05lc3RlZENoaWxkRGF0YXNldCA9IFt7Im5hbWVpZCI6MSwibmFtZSI6IkdhdmluICAgICAg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AgICAgICAgIn0seyJuYW1laWQiOjQsImFkZHIiOiJGYXIgICAgICAgICAgICAgICAgICJ9XTs="
"UGFyZW50RGF0YVJlYWR5ID0gW3sibmFtZWlkIjoxLCJuYW1lIjoiR2F2aW4gICAgICAgICAgICAgICAiLCJudW1yb3dzIjowLCJjaGlsZHJlbiI6eyJSb3ciOltdfX0seyJuYW1laWQiOjIsIm5hbWUiOiJMaXogICAgICAgICAgICAgICAgICIsIm51bXJvd3MiOjAsImNoaWxkcmVuIjp7IlJvdyI6W119fSx7Im5hbWVpZCI6MywibmFtZSI6Ik1yIE5vYm9keSAgICAgICAgICAgIiwibnVtcm93cyI6MCwiY2hpbGRyZW4iOnsiUm93IjpbXX19LHsibmFtZWlkIjo0LCJuYW1lIjoiQW55d2hlcmUgICAgICAgICAgICAiLCJudW1yb3dzIjowLCJjaGlsZHJlbiI6eyJSb3ciOltdfX1dO05lc3RlZENoaWxkRGF0YXNldCA9IFt7Im5hbWVpZCI6MSwibmFtZSI6IkdhdmluICAgICAgICAgICAgICAgIiwibnVtcm93cyI6MSwiY2hpbGRyZW4iOnsiUm93IjpbeyJuYW1laWQiOjEsImFkZHIiOiIxMCBNYWx0IExhbmUgICAgICAgICJ9XX19LHsibmFtZWlkIjoyLCJuYW1lIjoiTGl6ICAgICAgICAgICAgICAgICAiLCJudW1yb3dzIjoyLCJjaGlsZHJlbiI6eyJSb3ciOlt7Im5hbWVpZCI6MiwiYWRkciI6IjEwIE1hbHQgTGFuZSAgICAgICAgIn0seyJuYW1laWQiOjIsImFkZHIiOiIzIFRoZSBjb3R0YWdlcyAgICAgICJ9XX19LHsibmFtZWlkIjozLCJuYW1lIjoiTXIgTm9ib2R5ICAgICAgICAgICAiLCJudW1yb3dzIjowLCJjaGlsZHJlbiI6eyJSb3ciOltdfX0seyJuYW1laWQiOjQsIm5hbWUiOiJBbnl3aGVyZSAgICAgICAgICAgICIsIm51bXJvd3MiOjQsImNoaWxkcmVuIjp7IlJvdyI6W3sibmFtZWlkIjo0LCJhZGRyIjoiSGVyZSAgICAgICAgICAgICAgICAifSx7Im5hbWVpZCI6NCwiYWRkciI6IlRoZXJlICAgICAgICAgICAgICAgIn0seyJuYW1laWQiOjQsImFkZHIiOiJOZWFyICAgICAgICAgICAgICAgICJ9LHsibmFtZWlkIjo0LCJhZGRyIjoiRmFyICAgICAgICAgICAgICAgICAifV19fV07Q2hpbGRyZW5FeHRyYWN0ZWQgPSBbeyJuYW1laWQiOjEsImFkZHIiOiIxMCBNYWx0IExhbmUgICAgICAgICJ9LHsibmFtZWlkIjoyLCJhZGRyIjoiMTAgTWFsdCBMYW5lICAgICAgICAifSx7Im5hbWVpZCI6MiwiYWRkciI6IjMgVGhlIGNvdHRhZ2VzICAgICAgIn0seyJuYW1laWQiOjQsImFkZHIiOiJIZXJlICAgICAgICAgICAgICAgICJ9LHsibmFtZWlkIjo0LCJhZGRyIjoiVGhlcmUgICAgICAgICAgICAgICAifSx7Im5hbWVpZCI6NCwiYWRkciI6Ik5lYXIgICAgICAgICAgICAgICAgIn0seyJuYW1laWQiOjQsImFkZHIiOiJGYXIgICAgICAgICAgICAgICAgICJ9XTtQYXJlbnRFeHRyYWN0ZWQgPSBbeyJuYW1laWQiOjEsIm5hbWUiOiJHYXZpbiAgICAgICAgICAgICAgICJ9LHsibmFtZWlkIjoyLCJuYW1lIjoiTGl6ICAgICAgICAgICAgICAgICAifSx7Im5hbWVpZCI6MywibmFtZSI6Ik1yIE5vYm9keSAgICAgICAgICAgIn0seyJuYW1laWQiOjQsIm5hbWUiOiJBbnl3aGVyZSAgICAgICAgICAgICJ9XTs="
]
},
{
Expand Down
13 changes: 8 additions & 5 deletions esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ import copyStaticFiles from "esbuild-copy-static-files";
import process from "node:process";
import path from "node:path";
import { writeFileSync } from "node:fs";
import tsconfigExtension from "./tsconfig.extension.json" with {"type": "json"};
import tsconfigWebview from "./tsconfig.webview.json" with {"type": "json"};

const outputDirectory = "dist";
const production = process.argv.includes("--production");
const watch = process.argv.includes("--watch");

async function main(entryPoint, platform, format, plugins = []) {
async function main(tsconfigRaw, entryPoint, platform, format, plugins = []) {
const ctx = await esbuild.context({
tsconfigRaw,
entryPoints: [entryPoint],
outdir: outputDirectory,
bundle: true,
Expand Down Expand Up @@ -75,15 +78,15 @@ function replaceAfterTransform() {
}

Promise.all([
main("./src/extension.ts", "node", "cjs", [
main(tsconfigExtension, "./src/extension.ts", "node", "cjs", [
copyStaticFiles({
src: "./node_modules/@hpcc-js/ddl-shim/schema/v2.json",
dest: path.join(outputDirectory, "v2.json"),
})
]),
main("./src/notebook/renderers/wuRenderer.tsx", "node", "cjs"),
main("./src/notebook/renderers/ojsRenderer.ts", "browser", "esm"),
main("./src/eclwatch.tsx", "browser", "iife", [replaceAfterTransform()])
main(tsconfigExtension, "./src/notebook/renderers/wuRenderer.tsx", "node", "cjs"),
main(tsconfigWebview, "./src/notebook/renderers/ojsRenderer.ts", "browser", "esm"),
main(tsconfigWebview, "./src/eclwatch.tsx", "browser", "iife", [replaceAfterTransform()])
]).catch((e) => {
console.error(e);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion src/ecl/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class ECLChat {
// when you type `@`, and can contribute sub-commands in the chat input
// that appear when you type `/`.
const eclChat = vscode.chat.createChatParticipant(ECL_PARTICIPANT_ID, handler);
eclChat.iconPath = vscode.Uri.joinPath(ctx.extensionUri, "hpcc-icon.png");
eclChat.iconPath = vscode.Uri.joinPath(ctx.extensionUri, "resources/hpcc-icon.png");
eclChat.followupProvider = {
provideFollowups(result: IECLChatResult, context: vscode.ChatContext, token: vscode.CancellationToken) {
return [{
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"declarationDir": "./types",
"module": "NodeNext",
"target": "ESNext",
"jsx": "react",
"declaration": true,
"strict": true,
"skipLibCheck": true,
Expand Down

0 comments on commit 820c456

Please sign in to comment.