@nteract/actions
Advanced tools
Comparing version 1.0.0 to 1.0.2-alpha.0
@@ -494,3 +494,3 @@ import * as actions from "../src/actions"; | ||
type: actionTypes.SET_NOTIFICATION_SYSTEM, | ||
notificationSystem: null | ||
payload: { notificationSystem: null } | ||
}); | ||
@@ -592,2 +592,24 @@ }); | ||
describe("updateOutputMetadata", () => { | ||
test("creates a UPDATE_OUTPUT_METADATA action", () => { | ||
const contentRef = createContentRef(); | ||
expect( | ||
actions.updateOutputMetadata({ | ||
id: "235", | ||
contentRef, | ||
metadata: { meta: "data" }, | ||
index: 0 | ||
}) | ||
).toEqual({ | ||
type: actionTypes.UPDATE_OUTPUT_METADATA, | ||
payload: { | ||
id: "235", | ||
contentRef, | ||
metadata: { meta: "data" }, | ||
index: 0 | ||
} | ||
}); | ||
}); | ||
}); | ||
describe("setGithubToken", () => { | ||
@@ -597,3 +619,3 @@ test("creates a SET_GITHUB_TOKEN action", () => { | ||
type: actionTypes.SET_GITHUB_TOKEN, | ||
githubToken: "token_string" | ||
payload: { githubToken: "token_string" } | ||
}); | ||
@@ -600,0 +622,0 @@ }); |
@@ -1,2 +0,5 @@ | ||
export * from "./actions"; | ||
export * from "./actionTypes"; | ||
/** | ||
* @module actions | ||
*/ | ||
export * from "./actions/index"; | ||
export * from "./actionTypes/index"; |
"use strict"; | ||
/** | ||
* @module actions | ||
*/ | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
exports.__esModule = true; | ||
__export(require("./actions")); | ||
__export(require("./actionTypes")); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./actions/index")); | ||
__export(require("./actionTypes/index")); |
{ | ||
"name": "@nteract/actions", | ||
"version": "1.0.0", | ||
"version": "1.0.2-alpha.0", | ||
"description": "A collection of actions", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
"prepare": "npm run build", | ||
"prepublishOnly": "npm run build", | ||
"build": "npm run build:clean && npm run build:lib", | ||
"build:clean": "tsc -b --clean", | ||
"build:lib": "tsc -b", | ||
"build:lib:watch": "tsc -b --watch", | ||
"build:watch": "npm run build:clean && npm run build:lib:watch" | ||
}, | ||
"nteractDesktop": "src/index.ts", | ||
"scripts": {}, | ||
"keywords": [], | ||
@@ -20,6 +13,9 @@ "author": "Safia Abdalla <safia@safia.rocks>", | ||
"dependencies": { | ||
"@nteract/commutable": "6.0.0-alpha.0", | ||
"@nteract/types": "^3.1.0", | ||
"immutable": "^4.0.0-rc.12" | ||
} | ||
"@nteract/commutable": "^6.0.2-alpha.0", | ||
"@nteract/messaging": "^5.0.2-alpha.0", | ||
"@nteract/types": "^3.1.2-alpha.0", | ||
"immutable": "^4.0.0-rc.12", | ||
"rx-jupyter": "^4.0.2-alpha.0" | ||
}, | ||
"gitHead": "9ef8b723c581862d5c56b7ffd62a21393e7d83b9" | ||
} |
@@ -8,2 +8,3 @@ /** | ||
import * as actionTypes from "../actionTypes"; | ||
import { JSONObject } from "@nteract/commutable"; | ||
@@ -346,1 +347,13 @@ export function setExecutionState(payload: { | ||
} | ||
export function updateOutputMetadata(payload: { | ||
id: CellId; | ||
metadata: JSONObject; | ||
contentRef: ContentRef; | ||
index: number; | ||
}): actionTypes.UpdateOutputMetadata { | ||
return { | ||
type: actionTypes.UPDATE_OUTPUT_METADATA, | ||
payload | ||
}; | ||
} |
/** | ||
* @module actions | ||
*/ | ||
import { ContentRef, KernelRef } from "@nteract/types"; | ||
import { ContentRef, KernelRef, KernelspecInfo } from "@nteract/types"; | ||
import * as actionTypes from "../actionTypes"; | ||
export const fetchContent = (payload: { | ||
import { contents } from "rx-jupyter"; | ||
export const changeContentName = (payload: { | ||
filepath: string; | ||
params: Object; | ||
kernelRef: KernelRef; | ||
contentRef: ContentRef; | ||
}): actionTypes.FetchContent => ({ | ||
prevFilePath: string; | ||
}): actionTypes.ChangeContentName => ({ | ||
type: actionTypes.CHANGE_CONTENT_NAME, | ||
payload | ||
}); | ||
export const changeContentNameFulfilled = (payload: { | ||
filepath: string; | ||
contentRef: ContentRef; | ||
prevFilePath: string; | ||
}): actionTypes.ChangeContentNameFulfilled => ({ | ||
type: actionTypes.CHANGE_CONTENT_NAME_FULFILLED, | ||
payload | ||
}); | ||
export const changeContentNameFailed = (payload: { | ||
basepath: string; | ||
filepath: string; | ||
error: Error; | ||
contentRef: ContentRef; | ||
prevFilePath: string; | ||
}): actionTypes.ChangeContentNameFailed => ({ | ||
type: actionTypes.CHANGE_CONTENT_NAME_FAILED, | ||
payload | ||
}); | ||
export const fetchContent = ( | ||
payload: actionTypes.FetchContent["payload"] | ||
): actionTypes.FetchContent => ({ | ||
type: actionTypes.FETCH_CONTENT, | ||
@@ -20,3 +48,3 @@ payload | ||
filepath: string; | ||
model: any; | ||
model: contents.IContent; | ||
kernelRef: KernelRef; | ||
@@ -117,3 +145,3 @@ contentRef: ContentRef; | ||
export function newNotebook(payload: { | ||
kernelSpec: object; | ||
kernelSpec: KernelspecInfo; | ||
cwd: string; | ||
@@ -120,0 +148,0 @@ kernelRef: KernelRef; |
@@ -12,3 +12,4 @@ /** | ||
KernelRef, | ||
LanguageInfoMetadata | ||
LanguageInfoMetadata, | ||
PayloadMessage | ||
} from "@nteract/types"; | ||
@@ -71,3 +72,5 @@ | ||
type: actionTypes.SET_NOTIFICATION_SYSTEM, | ||
notificationSystem | ||
payload: { | ||
notificationSystem | ||
} | ||
}; | ||
@@ -81,3 +84,5 @@ } | ||
type: actionTypes.SET_GITHUB_TOKEN, | ||
githubToken | ||
payload: { | ||
githubToken | ||
} | ||
}; | ||
@@ -92,4 +97,6 @@ } | ||
type: actionTypes.SET_CONFIG_AT_KEY, | ||
key, | ||
value | ||
payload: { | ||
key, | ||
value | ||
} | ||
}; | ||
@@ -124,5 +131,7 @@ } | ||
export const configLoaded = (config: any) => ({ | ||
type: actionTypes.MERGE_CONFIG, | ||
config | ||
export const configLoaded = (payload: { | ||
config: object; | ||
}): actionTypes.MergeConfigAction => ({ | ||
payload, | ||
type: actionTypes.MERGE_CONFIG | ||
}); | ||
@@ -185,3 +194,3 @@ | ||
// Not to be confused with a redux style action payload | ||
payload: any; | ||
payload: PayloadMessage; | ||
contentRef: ContentRef; | ||
@@ -188,0 +197,0 @@ }): actionTypes.AcceptPayloadMessage { |
@@ -13,7 +13,8 @@ /** | ||
import * as actionTypes from "../actionTypes"; | ||
import { ExecuteRequest } from "@nteract/messaging"; | ||
export function launchKernelFailed(payload: { | ||
error: Error; | ||
kernelRef: KernelRef; | ||
contentRef: ContentRef; | ||
kernelRef?: KernelRef; | ||
contentRef?: ContentRef; | ||
}): actionTypes.LaunchKernelFailed { | ||
@@ -54,3 +55,3 @@ return { | ||
kernelSpecName: any; | ||
oldKernelRef?: KernelRef; | ||
oldKernelRef?: KernelRef | null; | ||
contentRef: ContentRef; | ||
@@ -99,3 +100,3 @@ }): actionTypes.ChangeKernelByName { | ||
restarting: boolean; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}): actionTypes.KillKernelAction { | ||
@@ -110,3 +111,3 @@ return { | ||
error: Error; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}): actionTypes.KillKernelFailed { | ||
@@ -121,3 +122,3 @@ return { | ||
export function killKernelSuccessful(payload: { | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}): actionTypes.KillKernelSuccessful { | ||
@@ -131,3 +132,3 @@ return { | ||
export function interruptKernel(payload: { | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}): actionTypes.InterruptKernel { | ||
@@ -141,3 +142,3 @@ return { | ||
export function interruptKernelSuccessful(payload: { | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}): actionTypes.InterruptKernelSuccessful { | ||
@@ -152,3 +153,3 @@ return { | ||
error: Error; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}): actionTypes.InterruptKernelFailed { | ||
@@ -164,3 +165,3 @@ return { | ||
outputHandling: actionTypes.RestartKernelOutputHandling; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
contentRef: ContentRef; | ||
@@ -198,4 +199,3 @@ }): actionTypes.RestartKernel { | ||
id: string; | ||
// TODO: Convert the sendExecuteRequest message from an 'any' to a jupyter message object | ||
message: any; | ||
message: ExecuteRequest; | ||
contentRef: ContentRef; | ||
@@ -257,3 +257,3 @@ }): actionTypes.SendExecuteRequest { | ||
error: Error; | ||
contentRef: ContentRef; | ||
contentRef?: ContentRef; | ||
}): actionTypes.ExecuteFailed { | ||
@@ -288,3 +288,3 @@ return { | ||
export function shutdownReplySucceeded(payload: { | ||
text: string; | ||
content: { restart: boolean }; | ||
kernelRef: KernelRef; | ||
@@ -291,0 +291,0 @@ }): actionTypes.ShutdownReplySucceeded { |
/** | ||
* @module actions | ||
*/ | ||
import { CellId, CellType } from "@nteract/commutable"; | ||
import { CellId, CellType, JSONObject } from "@nteract/commutable"; | ||
import { ContentRef } from "@nteract/types"; | ||
@@ -248,1 +248,12 @@ | ||
}; | ||
export const UPDATE_OUTPUT_METADATA = "UPDATE_OUTPUT_METADATA"; | ||
export type UpdateOutputMetadata = { | ||
type: "UPDATE_OUTPUT_METADATA"; | ||
payload: { | ||
id: CellId; | ||
contentRef: ContentRef; | ||
metadata: JSONObject; | ||
index: number; | ||
}; | ||
}; |
/** | ||
* @module actions | ||
*/ | ||
import { ContentRef, KernelRef } from "@nteract/types"; | ||
import { ContentRef, KernelRef, KernelspecInfo } from "@nteract/types"; | ||
export const CHANGE_CONTENT_NAME = "CORE/CHANGE_CONTENT_NAME"; | ||
export type ChangeContentName = { | ||
type: "CORE/CHANGE_CONTENT_NAME"; | ||
payload: { | ||
filepath: string; | ||
prevFilePath: string; | ||
contentRef: ContentRef; | ||
}; | ||
}; | ||
export const CHANGE_CONTENT_NAME_FULFILLED = "CORE/CHANGE_CONTENT_NAME_FULFILLED"; | ||
export type ChangeContentNameFulfilled = { | ||
type: "CORE/CHANGE_CONTENT_NAME_FULFILLED"; | ||
payload: { | ||
filepath: string; | ||
prevFilePath: string; | ||
contentRef: ContentRef; | ||
}; | ||
}; | ||
export const CHANGE_CONTENT_NAME_FAILED = "CORE/CHANGE_CONTENT_NAME_FAILED"; | ||
export type ChangeContentNameFailed = { | ||
type: "CORE/CHANGE_CONTENT_NAME_FAILED"; | ||
payload: { | ||
basepath: string; | ||
filepath: string; | ||
prevFilePath: string; | ||
error: Error; | ||
contentRef: ContentRef; | ||
}; | ||
}; | ||
export const FETCH_CONTENT = "CORE/FETCH_CONTENT"; | ||
@@ -25,2 +57,4 @@ export type FetchContent = { | ||
contentRef: ContentRef; | ||
created?: Date | null; | ||
lastSaved?: Date | null; | ||
}; | ||
@@ -103,3 +137,3 @@ }; | ||
cwd: string; | ||
kernelSpec: Object; | ||
kernelSpec: KernelspecInfo; | ||
kernelRef: KernelRef; | ||
@@ -106,0 +140,0 @@ contentRef: ContentRef; |
@@ -12,6 +12,8 @@ /** | ||
import { ContentRef, HostRef, KernelRef } from "@nteract/types"; | ||
import { ContentRef, HostRef, KernelRef, PayloadMessage } from "@nteract/types"; | ||
import { HostRecord } from "@nteract/types"; | ||
import { LanguageInfoMetadata } from "@nteract/types"; | ||
import { System as NotificationSystem } from "react-notification-system"; | ||
export * from "./cells"; | ||
@@ -94,3 +96,3 @@ export * from "./contents"; | ||
id: CellId; | ||
payload: object; | ||
payload: PayloadMessage; | ||
contentRef: ContentRef; | ||
@@ -155,4 +157,6 @@ }; | ||
type: "SET_CONFIG_AT_KEY"; | ||
key: string; | ||
value: T; | ||
payload: { | ||
key: string; | ||
value: T; | ||
}; | ||
}; | ||
@@ -163,3 +167,5 @@ | ||
type: "MERGE_CONFIG"; | ||
config: Map<string, ImmutableJSONType>; | ||
payload: { | ||
config: { [key: string]: any }; | ||
}; | ||
}; | ||
@@ -197,3 +203,5 @@ | ||
type: "SET_NOTIFICATION_SYSTEM"; | ||
notificationSystem: Object; | ||
payload: { | ||
notificationSystem: NotificationSystem; | ||
}; | ||
}; | ||
@@ -204,3 +212,5 @@ | ||
type: "SET_GITHUB_TOKEN"; | ||
githubToken: string; | ||
payload: { | ||
githubToken: string; | ||
}; | ||
}; | ||
@@ -207,0 +217,0 @@ |
@@ -9,2 +9,3 @@ /** | ||
KernelInfo, | ||
KernelspecInfo, | ||
KernelRef, | ||
@@ -72,3 +73,3 @@ LocalKernelProps, | ||
error: Error; | ||
contentRef: ContentRef; | ||
contentRef?: ContentRef; | ||
}; | ||
@@ -91,3 +92,3 @@ error: true; | ||
payload: { | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}; | ||
@@ -100,3 +101,3 @@ }; | ||
payload: { | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}; | ||
@@ -110,3 +111,3 @@ }; | ||
error: Error; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}; | ||
@@ -121,3 +122,3 @@ error: true; | ||
restarting: boolean; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}; | ||
@@ -131,3 +132,3 @@ }; | ||
error: Error; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}; | ||
@@ -141,3 +142,3 @@ error: true; | ||
payload: { | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
}; | ||
@@ -152,3 +153,3 @@ }; | ||
outputHandling: RestartKernelOutputHandling; | ||
kernelRef: KernelRef; | ||
kernelRef?: KernelRef | null; | ||
contentRef: ContentRef; | ||
@@ -183,3 +184,3 @@ }; | ||
kernelRef: KernelRef; | ||
kernelSpec: Object; | ||
kernelSpec: KernelspecInfo; | ||
cwd: string; | ||
@@ -196,3 +197,3 @@ selectNextKernel: boolean; | ||
kernelSpecName: string; | ||
oldKernelRef?: KernelRef; | ||
oldKernelRef?: KernelRef | null; | ||
contentRef: ContentRef; | ||
@@ -219,4 +220,4 @@ }; | ||
error: Error; | ||
kernelRef: KernelRef; | ||
contentRef: ContentRef; | ||
kernelRef?: KernelRef; | ||
contentRef?: ContentRef; | ||
}; | ||
@@ -278,3 +279,3 @@ error: true; | ||
payload: { | ||
text: string; | ||
content: { restart: boolean }; | ||
kernelRef: KernelRef; | ||
@@ -281,0 +282,0 @@ }; |
/** | ||
* @module actions | ||
*/ | ||
export * from "./actions"; | ||
export * from "./actionTypes"; | ||
export * from "./actions/index"; | ||
export * from "./actionTypes/index"; |
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "lib" | ||
"outDir": "lib", | ||
"rootDir": "src" | ||
}, | ||
"include": ["src"] | ||
"include": ["src"], | ||
"references": [ | ||
{ "path": "../commutable" }, | ||
{ "path": "../messaging" }, | ||
{ "path": "../rx-jupyter" }, | ||
{ "path": "../types" } | ||
] | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
135683
5
38
4833
2
2
+ Addedrx-jupyter@^4.0.2-alpha.0
+ Added@nteract/commutable@6.0.2-alpha.0(transitive)
+ Added@nteract/messaging@5.0.2-alpha.0(transitive)
+ Added@nteract/types@3.1.2-alpha.0(transitive)
+ Added@types/uuid@3.4.13(transitive)
+ Addedjs-cookie@2.2.1(transitive)
+ Addedrx-jupyter@4.0.2-alpha.0(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedurl-join@4.0.1(transitive)
+ Addedurl-search-params@1.1.0(transitive)
- Removed@nteract/commutable@6.0.0-alpha.0(transitive)
- Removed@nteract/types@3.1.0(transitive)