New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ciderjs/dgs

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ciderjs/dgs

definitely type support for local development with Google Apps Script library

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
0
Created
Source

Definitely-typed Library for GoogleAppsScript

Usage

Install

npm install dgs --save-dev

Use Library .d.ts file in TypeScript files

Add library types into global of your local ts files

for server-side script:

/// <reference types="dgs/dist/types/dayjs" />
dayjs.dayjs('2024-01-01 12:23:34').add(1, 'D').format('YYYY/MM/DD HH:mm'); // '2024/01/02 12:23'

for client-side script:

/// <reference types="dgs/dist/types/clientSideGoogle" />
interface ResponseValue {
  value: string;
}
export default function Home() {
  const [responseValue, setResponseValue] = useState<ResponseValue | null>(null);
  useEffect(() => {
    google
      .script
      .run
      .withSuccessHandler((response: string) => {
        const responseValues = JSON.parse(response);
      })
      .useServerSideScript(parameters);
  }, [google]);
  return (<>
    response is {responseValue.value}
  </>);
}

Use cli tool what setup library in your appsscript.json

You can install Apps Script libraries into your project via this cli tool.

  • This tool use @google/clasp, so you must setup clasp before use this.
npx dgs install

Roadmap

  • OAuth2
    • 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF
  • ImgApp
    • 1T03nYHRho6XMWYcaumClcWr6ble65mAT8OLJqRFJ5lukPVogAN2NDl-y
  • Underscore
    • 1PcEHcGVC1njZd8SfXtmgQk19djwVd2GrrW1gd7U5hNk033tzi6IUvIAV
  • SlackApp
    • 1on93YOYfSmV92R5q59NpKmsyWIQD8qnoLYk-gkQBI92C58SPyA2x1-bq
  • ChatWorkClient
    • 1nf253qsOnZ-RcdcFu1Y2v4pGwTuuDxN5EbuvKEZprBWg764tjwA5fLav
  • spreadsheets-sql
    • 17p1ghyOkbWOhdE4bdBFhOXL079I-yt5xd0LAi00Zs5N-bUzpQtN7iT1a
  • Parser: done
    • 1Mc8BthYthXx6CoIz90-JiSzSafVnT6U3t0z_W3hLTAX5ek4w0G_EIrNw
  • dayjs: done
    • 1ShsRhHc8tgPy5wGOzUvgEhOedJUQD53m-gd8lG2MOgs-dXC_aCZn9lFB

File Template

/// <reference types="@types/google-apps-script" />

declare namespace GoogleAppsScript {
  namespace Libraries {
    namespace LibraryName {
      const globalValue: string;
      function method(arg: number[]): void;
      class Dog {
        method(arg: string): void;
      }
    }
  }
}

declare const LibraryName: typeof GoogleAppsScript.Libraries.LibraryName;

Keywords

GoogleAppsScript

FAQs

Package last updated on 29 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts